inc_007.phpt 332 B

12345678910111213141516171819202122
  1. --TEST--
  2. JIT INC: 007
  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. function foo() {
  15. $x = 1;
  16. $x += 0;
  17. return ++$x; // mem -> reg, reg
  18. }
  19. var_dump(foo());
  20. ?>
  21. --EXPECT--
  22. int(2)