loading...

re: Optimizing your PHP app speed VIEW POST

FULL DISCUSSION
 

Actually the explanation for point "3. Use a backslash in front of standard functions" is not entirely correct. Yes, there will be less opcode produced because PHP only needs to look at the global namespace, but this should barely be noticeable (and would be optimized by the OpCode-Cache on the second run anyways).

But the speed improvement shown in your benchmark does not result from this "less namespace lookup" thing, but from a compiler-optimized "count" function that will be used when calling it this way.

This only works for a handful of functions, though.
You can find the list here: github.com/FriendsOfPHP/PHP-CS-Fix...

code of conduct - report abuse