-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Apparently, call_user_func() is slow. References:
- php.net
- fab2s/call_user_func
- Optimize perf by replacing call_user_func with dynamic variablesĀ symfony/symfony#29309
We're using a couple (functions-l10n.php and functions-plugins.php as of writing) so the idea would be to replace them:
// before :
call_user_func( $function1 );
call_user_func( $function2, $param );
// after :
$function1();
$function2( $param );While at it, an is_callable() check before calling would be nice, to ensure the function is actually callable when it's user defined (plugins) (and make sure the cases of calling something callable and not callable are covered in a unit test)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers