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