PHP7 Use Statement

Classes, functions and constants being imported from the same namespace can now be grouped together in a single use statement.


use somenamespaceClassA;
use somenamespaceClassB;
use somenamespaceClassC as C;

use function somenamespacefn_a;
use function somenamespacefn_b;
use function somenamespacefn_c;

use const somenamespaceConstA;
use const somenamespaceConstB;
use const somenamespaceConstC;

// PHP 7+ code

use somenamespace{ClassA,ClassB,ClassC as C};
use function somenamespace{fn_a, fn_b, fn_c};
use const somenamespace{ConstA, ConstB, ConstC};