xref: /PHP-7.1/sapi/phpdbg/tests/watch_002.phpt (revision 6baaccc9)
1--TEST--
2Test simple array watchpoint with replace
3--PHPDBG--
4b 6
5r
6w a $a
7c
8
9q
10--EXPECTF--
11[Successful compilation of %s]
12prompt> [Breakpoint #0 added at %s:6]
13prompt> [Breakpoint #0 at %s:6, hits: 1]
14>00006: $a[0] = 2;
15 00007:
16 00008: $a = [0 => 3, 1 => 4];
17prompt> [Added watchpoint #0 for $a[]]
18prompt> [Breaking on watchpoint $a[]]
191 elements were added to the array
20>00009:
21prompt> [$a[] has been removed, removing watchpoint]
22[Script ended normally]
23prompt>
24--FILE--
25<?php
26
27$a = [];
28
29$a[0] = 1;
30$a[0] = 2;
31
32$a = [0 => 3, 1 => 4];
33