mod_003.phpt 516 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. JIT MOD: 003
  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=function
  10. --EXTENSIONS--
  11. opcache
  12. --FILE--
  13. <?php
  14. class Test {
  15. public $prop = 0;
  16. }
  17. function test1($test) {
  18. $test[0] %= 3;
  19. return $test;
  20. }
  21. function test2($test) {
  22. $test->prop %= 3;
  23. return $test;
  24. }
  25. var_dump(test1([0]));
  26. var_dump(test2(new Test));
  27. ?>
  28. --EXPECT--
  29. array(1) {
  30. [0]=>
  31. int(0)
  32. }
  33. object(Test)#1 (1) {
  34. ["prop"]=>
  35. int(0)
  36. }