We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closures returned by bindTo cannot be directly called.
Source:
class a { public static function init() { var_dump("test"); } } (function () { static::init(); })->bindTo(null, a::class)();
Result:
[daniil@daniil-arch jav]$ php src/q.php string(4) "test" [daniil@daniil-arch jav]$ jppm start -> linux -> app:run -> install Fatal error: Uncaught ParseError: Syntax error, unexpected 'function' in res://q.php on line 6, position 2 Stack Trace: #0 {main} thrown in res://q.php on line 6
Storing the return value of bindTo in a variable and calling that works just fine
The text was updated successfully, but these errors were encountered:
Workaround:
class a { public static function init() { var_dump("test"); } } ((function () { static::init(); })->bindTo(null, a::class))();
Sorry, something went wrong.
No branches or pull requests
Closures returned by bindTo cannot be directly called.
Source:
Result:
Storing the return value of bindTo in a variable and calling that works just fine
The text was updated successfully, but these errors were encountered: