Reputation: 1048
the title says it all. Is it ok to do something like:
<?php
use Some\Very\Long\Namespace\SomeClassName;
SomeClassName::someMethod();
Or does this somehow negatively affect the class loader?
Upvotes: 2
Views: 128
Reputation: 522066
All use
does is alias a long namespaced name to a different (shorter) local name. Your code is exactly equivalent to:
Some\Very\Long\Namespace\SomeClassName::someMethod();
So yes, it's perfectly fine.
Upvotes: 4