We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Is using "use" alias slower ?

Is using alias for "use" makes classes slower ? Anyone run a benchmark on that ?

Example:

use Phalcon\Mvc\Dispatcher as MvcDispatcher;

$dispatcher = new MvcDispatcher();


7.9k
edited Apr '15

I don't think that make your apps slower, but there is diff in microsecond or maybe nanosecond



34.6k
Accepted
answer
edited Apr '15

No, "use" renamings are resolved at compile time, if you're using ZendOptimizer or APC the bytecode has already passed the compilation phase so it does not impact performance in any way