assign_035.phpt 586 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. JIT ASSIGN: Segfault & memleak if no RC info
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=1M
  8. opcache.protect_memory=1
  9. ;opcache.jit_debug=257
  10. --EXTENSIONS--
  11. opcache
  12. --FILE--
  13. <?php
  14. class A {
  15. public function test() {
  16. $closure = function() { return "string"; };
  17. $arr = [
  18. 'a' => $closure(),
  19. 'b' => [$closure() => [],],
  20. ];
  21. $x = $arr;
  22. unset($x['b'][$closure()]['d']);
  23. $x = $arr;
  24. $x['a'] = $closure();
  25. return "okey";
  26. }
  27. }
  28. $a = new A();
  29. echo $a->test();
  30. ?>
  31. --EXPECT--
  32. okey