PHP 8.5.0 Alpha 1 available for testing

Voting

: min(zero, six)?
(Example: nine)

The Note You're Voting On

theyourcomputer at gmail dot com
7 years ago
In the case of call_user_func_array(), if you were to pass around an anonymous function and reference $this within the anonymous function, $this will faithfully refer to the class in the context in which the function was defined. Using ReflectionFunction::invokeArgs() does not seem to retain its original context--yeah, even if you bind the anonymous function before invoking. I recommend call_user_func_array() where context is a concern.

<< Back to user notes page

To Top