felpado icon indicating copy to clipboard operation
felpado copied to clipboard

call_user_func / call_user_func_array

Open lukaszlach opened this issue 11 years ago • 1 comments

Hi! First of all - very handy piece of code, congrats!

As call_user_func-family functions as considered slow and indeed are 3 times slower than native call they should be avoided. All variable content that is considered callable can be called both by using call_user_func($fn, ...) and $fn(...), but second one is faster and produces less op-codes internally.

I saw you use a lot of call_user_func in your code, do you think rewriting all of this to $fn(...) calls is worth trying? Would ilke help on this one...

Thanks!

lukaszlach avatar Jan 16 '14 17:01 lukaszlach

Help would be very appreciated :))

But using $fn(...) would we lose php 5.3 support?

pablodip avatar Jan 17 '14 21:01 pablodip