Frank Perez

Frank Perez

Keep in touch

An experienced Web Developer with years of experience in design, programming and server administration.

Blog

Overview

© 2018 by Frank Perez.

PHP Group Multiple use Declarations

As of PHP 7, you can now group your imported classes, functions, and constants from under the same namespace. Let’s look at a example to show you how you can start using this today in your projects.

Previously you’d have to write out your imports like so:

<?php

use App\Category;
use App\Product;

Now you can group them since they are within the same namespace of App like so.

<?php

use App\{Category, Product};