1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00
Files
archived-php-src/Zend/tests/closure_060.phpt
2020-02-03 22:52:20 +01:00

26 lines
383 B
PHP

--TEST--
runtime cache must be invalidated for Closure::call()
--FILE--
<?php
class A {
private static $priv = 7;
static function get() {
return function() {
var_dump(isset(A::$priv));
};
}
}
$closure = A::get();
$closure(); // init rt_cache
$closure->call(new class(){}, null);
$closure();
?>
--EXPECT--
bool(true)
bool(false)
bool(true)