watch_001.phpt 773 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. Test simple recursive watchpoint
  3. --INI--
  4. opcache.optimization_level=0
  5. --PHPDBG--
  6. b 3
  7. r
  8. w r $b
  9. c
  10. q
  11. --EXPECTF--
  12. [Successful compilation of %s]
  13. prompt> [Breakpoint #0 added at %s:3]
  14. prompt> [Breakpoint #0 at %s:3, hits: 1]
  15. >00003: $a = 1;
  16. 00004: $b = [$a];
  17. 00005:
  18. prompt> [Added recursive watchpoint #0 for $b]
  19. prompt> [Breaking on watchpoint $b]
  20. Old value:
  21. New value: Array ([0] => 1)
  22. >00006: unset($b);
  23. 00007: $b = 2;
  24. 00008:
  25. prompt> [Breaking on watchpoint $b]
  26. Old value inaccessible or destroyed
  27. New value:
  28. >00007: $b = 2;
  29. 00008:
  30. prompt> [Breaking on watchpoint $b]
  31. Old value:
  32. New value: 2
  33. >00008:
  34. prompt> [$b has been removed, removing watchpoint recursively]
  35. [Script ended normally]
  36. prompt>
  37. --FILE--
  38. <?php
  39. $a = 1;
  40. $b = [$a];
  41. unset($b);
  42. $b = 2;