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