1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/bug81626.phpt

18 lines
429 B
PHP

--TEST--
Bug #81626: Error on use static:: in __callStatic() 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"