diff options
author | Antony Dovgal <tony2001@php.net> | 2006-05-19 11:17:53 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-05-19 11:17:53 +0000 |
commit | 811b10014064a51393e54e9a46d3e2bfb6f35616 (patch) | |
tree | 3defae050ff0de473649441aa7ea60c1f8b5be65 | |
parent | 0f26edab9de02a6061caac73219cd19a0abbf7a5 (diff) | |
download | php-git-811b10014064a51393e54e9a46d3e2bfb6f35616.tar.gz |
add new tests (which produces segfault with 4.4 atm)
-rwxr-xr-x | tests/lang/bug35239.phpt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/lang/bug35239.phpt b/tests/lang/bug35239.phpt new file mode 100755 index 0000000000..7fc7b7d3b6 --- /dev/null +++ b/tests/lang/bug35239.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #35239 (Objects can lose references) +--FILE-- +<?php +$a = new stdClass; +$a->x0 = new stdClass; +$a->x0->y0 = 'a'; +$a->x0->y1 =& $a->x0; +$a->x0->y2 =& $a->x0; +$a->x0->y0 = 'b'; +var_dump($a); +$a->x0->y1 = "ok\n"; +echo $a->x0; +?> +--EXPECT-- +object(stdClass)#1 (1) { + ["x0"]=> + &object(stdClass)#2 (3) { + ["y0"]=> + string(1) "b" + ["y1"]=> + &object(stdClass)#2 (3) { + ["y0"]=> + string(1) "b" + ["y1"]=> + *RECURSION* + ["y2"]=> + *RECURSION* + } + ["y2"]=> + &object(stdClass)#2 (3) { + ["y0"]=> + string(1) "b" + ["y1"]=> + *RECURSION* + ["y2"]=> + *RECURSION* + } + } +} +ok |