xref: /PHP-8.1/Zend/tests/bug81626.phpt (revision d26965b2)
1--TEST--
2Bug #81626: Error on use static:: in __сallStatic() wrapped to Closure::fromCallable()
3--FILE--
4<?php
5class TestClass {
6    public static bool $wasCalled = false;
7    public static function __callStatic(string $name, array $args): string
8    {
9        static::$wasCalled = true;
10        return 'ok';
11    }
12}
13$closure = Closure::fromCallable([TestClass::class, 'foo']);
14var_dump($closure());
15?>
16--EXPECT--
17string(2) "ok"
18