|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-11-16 11:42 UTC] nikic@php.net
-Status: Open
+Status: Verified
[2021-11-16 11:42 UTC] nikic@php.net
[2021-11-16 11:47 UTC] git@php.net
[2021-11-16 11:47 UTC] git@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Description: ------------ Throws error on use static:: in __сallStatic() wrapped to Closure::fromCallable(). Note, if use static:: in static method wrapped to Closure::fromCallable(), then no errors. Test script: --------------- class TestClass { public static bool $wasCalled = false; public static function __callStatic(string $name, array $args): string { static::$wasCalled = true; return 'ok'; } } $closure = Closure::fromCallable([TestClass::class, 'foo']); $closure(); Expected result: ---------------- No errors. Actual result: -------------- Error: Cannot access "static" when no class scope is active