diff options
author | Dmitry Stogov <dmitry@php.net> | 2005-06-06 10:38:43 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2005-06-06 10:38:43 +0000 |
commit | ce23692663fe377111d79bc03cba88c21626841c (patch) | |
tree | af61a83ebda24f40a840c1a1fad8b7e60cfe5872 /Zend/tests/bug32799.phpt | |
parent | e5d3e078621018b01a5c0ee443a9547ab41754a7 (diff) | |
download | php-git-ce23692663fe377111d79bc03cba88c21626841c.tar.gz |
Fixed bug #32799 (crash: calling the corresponding global var during the destruct)
Diffstat (limited to 'Zend/tests/bug32799.phpt')
-rwxr-xr-x | Zend/tests/bug32799.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/bug32799.phpt b/Zend/tests/bug32799.phpt new file mode 100755 index 0000000000..7b09a50274 --- /dev/null +++ b/Zend/tests/bug32799.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #32799 (crash: calling the corresponding global var during the destruct) +--FILE-- +<?php +class test{ + public $c=1; + function __destruct (){ + $GLOBALS['p']->c++; // no warning + print $GLOBALS['p']->c."\n"; // segfault + var_dump($GLOBALS['p']); + } +} +$p=new test; +$p=null; //destroy the object by a new assignment (segfault) +?> +--EXPECT-- +2 +object(test)#1 (1) { + ["c"]=> + int(2) +} |