watch_004.phpt 870 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. Test detection of inline string manipulations on zval watch
  3. --SKIPIF--
  4. <?php
  5. if (PHP_INT_SIZE == 4) {
  6. die("xfail There may be flaws in the implementation of watchpoints that cause failures");
  7. }
  8. if (getenv('SKIP_ASAN')) {
  9. die("skip intentionally causes segfaults");
  10. }
  11. ?>
  12. --INI--
  13. opcache.optimization_level=0
  14. --PHPDBG--
  15. b 3
  16. r
  17. w $a
  18. c
  19. q
  20. --EXPECTF--
  21. [Successful compilation of %s]
  22. prompt> [Breakpoint #0 added at %s:3]
  23. prompt> [Breakpoint #0 at %s:3, hits: 1]
  24. >00003: $b = "a";
  25. 00004: $a = $b.$b;
  26. 00005: $a[1] = "b";
  27. prompt> [Added watchpoint #0 for $a]
  28. prompt> [Breaking on watchpoint $a]
  29. Old value:
  30. New value: aa
  31. >00005: $a[1] = "b";
  32. 00006:
  33. prompt> [Breaking on watchpoint $a]
  34. Old value: aa
  35. New value: ab
  36. >00006:
  37. prompt> [$a has been removed, removing watchpoint]
  38. [Script ended normally]
  39. prompt>
  40. --FILE--
  41. <?php
  42. $b = "a";
  43. $a = $b.$b;
  44. $a[1] = "b";