1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00
Files
archived-php-src/ext/opcache/tests/jit/init_static_method_call_001.phpt
2025-03-06 21:53:45 +03:00

25 lines
430 B
PHP

--TEST--
JIT INIT_STATIC_METHOD_CALL: 001 Invalid scope
--INI--
opcache.enable=1
opcache.enable_cli=1
--EXTENSIONS--
opcache
--FILE--
<?php
class C {
public static function foo() {
$f = function() {
return call_user_func(self::bar(), 1, 2, 3, 4, 5);
};
return $f();
}
public static function bar() {
return function($a, $b, $c, $d, $e) {return $a + $b + $c + $d + $e;};
}
}
var_dump(C::foo());
?>
--EXPECT--
int(15)