jmp_001.phpt 602 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. JMP 001: JMP_SET with constant arg
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. opcache.opt_debug_level=0x20000
  8. --EXTENSIONS--
  9. opcache
  10. --FILE--
  11. <?php
  12. function test() {
  13. $var = null;
  14. $var = $var ?: test2();
  15. return $var;
  16. }
  17. ?>
  18. --EXPECTF--
  19. $_main:
  20. ; (lines=1, args=0, vars=0, tmps=0)
  21. ; (after optimizer)
  22. ; %s:1-8
  23. 0000 RETURN int(1)
  24. test:
  25. ; (lines=4, args=0, vars=1, tmps=1)
  26. ; (after optimizer)
  27. ; %s:2-6
  28. 0000 INIT_FCALL_BY_NAME 0 string("test2")
  29. 0001 V1 = DO_FCALL_BY_NAME
  30. 0002 CV0($var) = QM_ASSIGN V1
  31. 0003 RETURN CV0($var)