1--TEST-- 2Test simple array watchpoint with replace 3--SKIPIF-- 4<?php 5if (getenv('SKIP_ASAN')) { 6 die("skip intentionally causes segfaults"); 7} 8?> 9--PHPDBG-- 10b 6 11r 12w a $a 13c 14 15q 16--EXPECTF-- 17[Successful compilation of %s] 18prompt> [Breakpoint #0 added at %s:6] 19prompt> [Breakpoint #0 at %s:6, hits: 1] 20>00006: $a[0] = 2; 21 00007: 22 00008: $a = [0 => 3, 1 => 4]; 23prompt> [Added watchpoint #0 for $a[]] 24prompt> [Breaking on watchpoint $a[]] 251 elements were added to the array 26>00009: 27prompt> [$a[] has been removed, removing watchpoint] 28[Script ended normally] 29prompt> 30--FILE-- 31<?php 32 33$a = []; 34 35$a[0] = 1; 36$a[0] = 2; 37 38$a = [0 => 3, 1 => 4]; 39