Your IP : 216.73.216.48


Current Path : /hdd/hdd12/install/php/php-7.4.32/Zend/tests/
Upload File :
Current File : //hdd/hdd12/install/php/php-7.4.32/Zend/tests/bug81626.phpt

--TEST--
Bug #81626: Error on use static:: in __сallStatic() wrapped to Closure::fromCallable()
--FILE--
<?php
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']);
var_dump($closure());
?>
--EXPECT--
string(2) "ok"