closure_060.phpt 383 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. runtime cache must be invalidated for Closure::call()
  3. --FILE--
  4. <?php
  5. class A {
  6. private static $priv = 7;
  7. static function get() {
  8. return function() {
  9. var_dump(isset(A::$priv));
  10. };
  11. }
  12. }
  13. $closure = A::get();
  14. $closure(); // init rt_cache
  15. $closure->call(new class(){}, null);
  16. $closure();
  17. ?>
  18. --EXPECT--
  19. bool(true)
  20. bool(false)
  21. bool(true)