PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for sapi/phpdbg/tests/watch_006.phpt ('Test multiple watch elements pointing to the same watchpoint')

Script

1: <?php
2:
3: $a 
= [0];
4:
$a[0] = 1;
5:
$b = &$a;
6:
$a[0] = 2;
7:
$a[1] = 3;
8:
$c = [1];
9:
$b = &$c;
10:

Expected

[Successful compilation of %s]
prompt> [Breakpoint #0 added at %s:4]
prompt> [Breakpoint #0 at %s:4, hits: 1]
>00004: $a[0] = 1;
 00005: $b = &$a;
 00006: $a[0] = 2;
prompt> [Added watchpoint #0 for $a[0]]
prompt> [Added recursive watchpoint #1 for $b]
prompt> [Breaking on watchpoint $a[0]]
Old value: 0
New value: 1
>00005: $b = &$a;
 00006: $a[0] = 2;
 00007: $a[1] = 3;
prompt> [Breaking on watchpoint $b]
Old value: 
New value (reference): Array ([0] => 1)
>00006: $a[0] = 2;
 00007: $a[1] = 3;
 00008: $c = [1];
prompt> [Breaking on watchpoint $a[0]]
Old value: 1
New value: 2
>00007: $a[1] = 3;
 00008: $c = [1];
 00009: $b = &$c;
prompt> [Element 1 has been added to watchpoint]
[Breaking on watchpoint $b[]]
1 elements were added to the array
>00008: $c = [1];
 00009: $b = &$c;
 00010: 
prompt> [Breaking on watchpoint $b]
Old value inaccessible or destroyed
New value (reference): Array ([0] => 2,[1] => 3)
>00009: $b = &$c;
 00010: 
prompt> [Breaking on watchpoint $b]
Old value inaccessible or destroyed
New value (reference): Array ([0] => 1)
>00010: 
prompt> [$b has been removed, removing watchpoint recursively]
[$a[0] has been removed, removing watchpoint]
[Script ended normally]
prompt>

Output

[Successful compilation of /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php]
prompt> [Breakpoint #0 added at /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php:4]
prompt> [Breakpoint #0 at /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php:4, hits: 1]
>00004: $a[0] = 1;
 00005: $b = &$a;
 00006: $a[0] = 2;
prompt> [Added watchpoint #0 for $a[0]]
prompt> [Added recursive watchpoint #1 for $b]
prompt> [Breaking on watchpoint $a[0]]
Old value: 0
New value: 1
>00005: $b = &$a;
 00006: $a[0] = 2;
 00007: $a[1] = 3;
prompt> [Breaking on watchpoint $b]
Old value: 
New value (reference): Array ([0] => 1)
>00006: $a[0] = 2;
 00007: $a[1] = 3;
 00008: $c = [1];
prompt> [Breaking on watchpoint $b]
Old value inaccessible or destroyed
New value (reference): Array ([0] => 2,[1] => 3)
>00009: $b = &$c;
 00010: 
prompt> [Breaking on watchpoint $b]
Old value inaccessible or destroyed
New value (reference): Array ([0] => 1)
>00010: 
prompt> [$b has been removed, removing watchpoint recursively]
[$a[0] has been removed, removing watchpoint]
[Script ended normally]
prompt> [Breakpoint at /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php:4 exists]
prompt> [Breakpoint at /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php:4 exists]
prompt>

Diff

021+ prompt> [Breaking on watchpoint $b]
022+ Old value inaccessible or destroyed
023+ New value (reference): Array ([0] => 2,[1] => 3)
024+ >00009: $b = &$c;
025+  00010: 
026+ prompt> [Breaking on watchpoint $b]
027+ Old value inaccessible or destroyed
028+ New value (reference): Array ([0] => 1)
029+ >00010: 
030+ prompt> [$b has been removed, removing watchpoint recursively]
031+ [$a[0] has been removed, removing watchpoint]
032+ [Script ended normally]
033+ prompt> [Breakpoint at /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php:4 exists]
034+ prompt> [Breakpoint at /var/php_gcov/PHP_HEAD/sapi/phpdbg/tests/watch_006.php:4 exists]
035+ prompt>
021- prompt> [Breaking on watchpoint $a[0]]
022- Old value: 1
023- New value: 2
024- >00007: $a[1] = 3;
025-  00008: $c = [1];
026-  00009: $b = &$c;
027- prompt> [Element 1 has been added to watchpoint]
028- [Breaking on watchpoint $b[]]
029- 1 elements were added to the array
030- >00008: $c = [1];
031-  00009: $b = &$c;
032-  00010: 
033- prompt> [Breaking on watchpoint $b]
034- Old value inaccessible or destroyed
035- New value (reference): Array ([0] => 2,[1] => 3)
036- >00009: $b = &$c;
037-  00010: 
038- prompt> [Breaking on watchpoint $b]
039- Old value inaccessible or destroyed
040- New value (reference): Array ([0] => 1)
041- >00010: 
042- prompt> [$b has been removed, removing watchpoint recursively]
043- [$a[0] has been removed, removing watchpoint]
044- [Script ended normally]
045- prompt>

 

Generated at Tue, 12 Dec 2017 23:59:00 +0000 (28 hours ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.