watch_005.phpt 866 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --TEST--
  2. Test proper watch comparisons when having multiple levels of indirection from a zval to its value
  3. --PHPDBG--
  4. b 3
  5. r
  6. w r $a
  7. c
  8. q
  9. --EXPECTF--
  10. [Successful compilation of %s]
  11. prompt> [Breakpoint #0 added at %s:3]
  12. prompt> [Breakpoint #0 at %s:3, hits: 1]
  13. >00003: $b = "a";
  14. 00004: $a = $b.$b;
  15. 00005: $c = &$a;
  16. prompt> [Added recursive watchpoint #0 for $a]
  17. prompt> [Breaking on watchpoint $a]
  18. Old value:
  19. New value: aa
  20. >00005: $c = &$a;
  21. 00006: $a[1] = "b";
  22. 00007:
  23. prompt> [Breaking on watchpoint $a]
  24. Old value inaccessible or destroyed
  25. New value (reference): aa
  26. >00006: $a[1] = "b";
  27. 00007:
  28. 00008: exit;
  29. prompt> [Breaking on watchpoint $a]
  30. Old value: aa
  31. New value: ab
  32. >00008: exit;
  33. 00009:
  34. prompt> [$a has been removed, removing watchpoint recursively]
  35. [Script ended normally]
  36. prompt>
  37. --FILE--
  38. <?php
  39. $b = "a";
  40. $a = $b.$b;
  41. $c = &$a;
  42. $a[1] = "b";
  43. exit;