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