summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/tests/watch_005.phpt
blob: 0bd44c9a012670383a074c2a1795575b30e3db0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--TEST--
Test proper watch comparisons when having multiple levels of indirection from a zval to its value
--SKIPIF--
<?php
if (PHP_INT_SIZE == 4) {
    die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
?>
--PHPDBG--
b 3
r
w r $a
c



q
--EXPECTF--
[Successful compilation of %s]
prompt> [Breakpoint #0 added at %s:3]
prompt> [Breakpoint #0 at %s:3, hits: 1]
>00003: $b = "a";
 00004: $a = $b.$b;
 00005: $c = &$a;
prompt> [Added recursive watchpoint #0 for $a]
prompt> [Breaking on watchpoint $a]
Old value: 
New value: aa
>00005: $c = &$a;
 00006: $a[1] = "b";
 00007: 
prompt> [Breaking on watchpoint $a]
Old value inaccessible or destroyed
New value (reference): aa
>00006: $a[1] = "b";
 00007: 
 00008: exit;
prompt> [Breaking on watchpoint $a]
Old value: aa
New value: ab
>00008: exit;
 00009: 
prompt> [$a has been removed, removing watchpoint recursively]
[Script ended normally]
prompt> 
--FILE--
<?php

$b = "a";
$a = $b.$b;
$c = &$a;
$a[1] = "b";

exit;