finish_leave_001.phpt 715 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --TEST--
  2. test finish and leave commands
  3. --INI--
  4. opcache.optimization_level=0
  5. --PHPDBG--
  6. b bar
  7. b 5
  8. r
  9. finish
  10. leave
  11. leave
  12. q
  13. --EXPECTF--
  14. [Successful compilation of %s]
  15. prompt> [Breakpoint #0 added at bar]
  16. prompt> [Breakpoint #1 added at %s:5]
  17. prompt> [Breakpoint #0 in bar() at %s:9, hits: 1]
  18. >00009: return "world";
  19. 00010: }
  20. 00011:
  21. prompt> [Breakpoint #1 at %s:5, hits: 1]
  22. >00005: return ["hello", $other];
  23. 00006: }
  24. 00007:
  25. prompt> [Breaking for leave at %s:5]
  26. >00005: return ["hello", $other];
  27. 00006: }
  28. 00007:
  29. prompt> [Already at the end of the function]
  30. prompt>
  31. --FILE--
  32. <?php
  33. function foo() {
  34. $other = bar();
  35. return ["hello", $other];
  36. }
  37. function bar() {
  38. return "world";
  39. }
  40. foo();