print_002.phpt 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. foo:
  21. ; (lines=8, args=1, vars=1, tmps=2)
  22. ; %s:14-16
  23. L0014 0000 CV0($baz) = RECV 1
  24. L0015 0001 INIT_FCALL %d %d string("var_dump")
  25. L0015 0002 INIT_FCALL %d %d string("strrev")
  26. L0015 0003 SEND_VAR CV0($baz) 1
  27. L0015 0004 V1 = DO_ICALL
  28. L0015 0005 SEND_VAR V1 1
  29. L0015 0006 DO_ICALL
  30. L0016 0007 RETURN null
  31. prompt> L0015 0001 INIT_FCALL %d %d string("var_dump")
  32. prompt>
  33. --FILE--
  34. <?php
  35. namespace Foo {
  36. class Bar {
  37. function Foo($bar) {
  38. var_dump($bar);
  39. }
  40. function baz() { }
  41. }
  42. }
  43. namespace {
  44. function foo($baz) {
  45. var_dump(strrev($baz));
  46. }
  47. (new \Foo\Bar)->Foo("test");
  48. foo("test");
  49. }