print_002.phpt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --TEST--
  2. Relative print commands
  3. --INI--
  4. opcache.enable_cli=0
  5. --PHPDBG--
  6. b foo
  7. r
  8. p
  9. p o
  10. q
  11. --EXPECTF--
  12. [Successful compilation of %s]
  13. prompt> [Breakpoint #0 added at foo]
  14. prompt> string(4) "test"
  15. [Breakpoint #0 in foo() at %s:15, hits: 1]
  16. >00015: var_dump(strrev($baz));
  17. 00016: }
  18. 00017:
  19. prompt> [Stack in foo() (8 ops)]
  20. L14-16 foo() %s - %s + 8 ops
  21. L14 #0 RECV 1 $baz
  22. L15 #1 INIT_FCALL%s %d %s "var_dump"
  23. L15 #2 INIT_FCALL%s %d %s "strrev"
  24. L15 #3 SEND_VAR $baz 1
  25. L15 #4 DO_%cCALL @0
  26. L15 #5 SEND_VAR @0 1
  27. L15 #6 DO_%cCALL
  28. L16 #7 RETURN<-1> null
  29. prompt> [L15 %s INIT_FCALL%s %d %s "var_dump" %s]
  30. prompt>
  31. --FILE--
  32. <?php
  33. namespace Foo {
  34. class Bar {
  35. function Foo($bar) {
  36. var_dump($bar);
  37. }
  38. function baz() { }
  39. }
  40. }
  41. namespace {
  42. function foo($baz) {
  43. var_dump(strrev($baz));
  44. }
  45. (new \Foo\Bar)->Foo("test");
  46. foo("test");
  47. }