We use 'use' keyword to import other namespaces, namespace classes,
namespace functions, and namespace constants.

Example
1) use abc; (Import abc namespace)
2) use abc\ClassB; (Import ClassB  from abc namespace)
3) use function abc\sayhello; (Import sayhello function from abc namespace)
4) use const abc\name; (Import name constant  from abc namespace)

In (1) we are importing whole namespace and in (2) we are just importing
class. But there is no difference in syntax like when we import function we
use 'use function'. We should change (2) to 'use class abc\ClassB'. It will
make syntax more clear and remove any confusion and also match with other
syntax like use function  and use const. Current syntax will also work so
there will be no backward compatibility break.

Reply via email to