sccp_024.phpt 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. SCCP 024: Const replacing to op2 of INSTANCEOF
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. opcache.opt_debug_level=0x20000
  8. opcache.preload=
  9. --EXTENSIONS--
  10. opcache
  11. --FILE--
  12. <?php
  13. class A {
  14. function t($obj) {
  15. $a = "A";
  16. $b = "self";
  17. $c = 1;
  18. echo ($obj instanceof $a);
  19. echo ($obj instanceof $b);
  20. echo ($obj instanceof $c);
  21. }
  22. }
  23. ?>
  24. --EXPECTF--
  25. $_main:
  26. ; (lines=1, args=0, vars=0, tmps=0)
  27. ; (after optimizer)
  28. ; %ssccp_024.php:1-13
  29. 0000 RETURN int(1)
  30. A::t:
  31. ; (lines=10, args=1, vars=2, tmps=2)
  32. ; (after optimizer)
  33. ; %ssccp_024.php:3-10
  34. 0000 CV0($obj) = RECV 1
  35. 0001 CV1($c) = QM_ASSIGN int(1)
  36. 0002 T2 = INSTANCEOF CV0($obj) string("A")
  37. 0003 ECHO T2
  38. 0004 T2 = INSTANCEOF CV0($obj) string("self")
  39. 0005 ECHO T2
  40. 0006 V3 = FETCH_CLASS (no-autoload) (silent) (exception) CV1($c)
  41. 0007 T2 = INSTANCEOF CV0($obj) V3
  42. 0008 ECHO T2
  43. 0009 RETURN null