| Current Path : /hdd/hdd12/install/php/php-7.4.32/Zend/tests/ |
| 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"