print_001.phpt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --TEST--
  2. Basic print functionality
  3. --INI--
  4. opcache.enable_cli=0
  5. --PHPDBG--
  6. p foo
  7. p class \Foo\bar
  8. p
  9. p e
  10. q
  11. --EXPECTF--
  12. [Successful compilation of %s]
  13. prompt> [User Function foo (8 ops)]
  14. L14-16 foo() %s - %s + 8 ops
  15. L14 #0 RECV 1 $baz
  16. L15 #1 INIT_FCALL%s %d %s "var_dump"
  17. L15 #2 INIT_FCALL%s %d %s "strrev"
  18. L15 #3 SEND_VAR $baz 1
  19. L15 #4 DO_%cCALL @0
  20. L15 #5 SEND_VAR @0 1
  21. L15 #6 DO_%cCALL
  22. L16 #7 RETURN<-1> null
  23. prompt> [User Class: Foo\Bar (2 methods)]
  24. L5-7 Foo\Bar::Foo() %s - %s + 5 ops
  25. L5 #0 RECV 1 $bar
  26. L6 #1 INIT_NS_FCALL_BY_NAME<1> "Foo\\var_dump"
  27. L6 #2 SEND_VAR_EX $bar 1
  28. L6 #3 DO_FCALL
  29. L7 #4 RETURN<-1> null
  30. L9-9 Foo\Bar::baz() %s - %s + 1 ops
  31. L9 #0 RETURN<-1> null
  32. prompt> [Not Executing!]
  33. prompt> [Context %s (11 ops)]
  34. L1-21 {main}() %s - %s + 11 ops
  35. L4 #0 NOP
  36. L14 #1 NOP
  37. L18 #2 NEW "Foo\\Bar" @1
  38. L18 #3 DO_FCALL
  39. L18 #4 INIT_METHOD_CALL<1> @1 "Foo"
  40. L18 #5 SEND_VAL_EX "test" 1
  41. L18 #6 DO_FCALL
  42. L19 #7 INIT_FCALL%s %d %s "foo"
  43. L19 #8 SEND_VAL "test" 1
  44. L19 #9 DO_FCALL
  45. L21 #10 RETURN<-1> 1
  46. prompt>
  47. --FILE--
  48. <?php
  49. namespace Foo {
  50. class Bar {
  51. function Foo($bar) {
  52. var_dump($bar);
  53. }
  54. function baz() { }
  55. }
  56. }
  57. namespace {
  58. function foo($baz) {
  59. var_dump(strrev($baz));
  60. }
  61. (new \Foo\Bar)->Foo("test");
  62. foo("test");
  63. }