Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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();


5.8k
edited Apr '15

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



33.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