watch_002.phpt 540 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Test simple array watchpoint with replace
  3. --PHPDBG--
  4. b 6
  5. r
  6. w a $a
  7. c
  8. q
  9. --EXPECTF--
  10. [Successful compilation of %s]
  11. prompt> [Breakpoint #0 added at %s:6]
  12. prompt> [Breakpoint #0 at %s:6, hits: 1]
  13. >00006: $a[0] = 2;
  14. 00007:
  15. 00008: $a = [0 => 3, 1 => 4];
  16. prompt> [Added watchpoint #0 for $a[]]
  17. prompt> [Breaking on watchpoint $a[]]
  18. 1 elements were added to the array
  19. >00009:
  20. prompt> [$a[] has been removed, removing watchpoint]
  21. [Script ended normally]
  22. prompt>
  23. --FILE--
  24. <?php
  25. $a = [];
  26. $a[0] = 1;
  27. $a[0] = 2;
  28. $a = [0 => 3, 1 => 4];