Annotation of embedaddon/php/Zend/tests/bug32596.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #32596 (Segfault/Memory Leak by getClass (etc) in __destruct)
3: --FILE--
4: <?php
5: class BUG {
6: public $error = "please fix this thing, it wasted a nice part of my life!\n";
7: static function instance() {return new BUG();}
8:
9: function __destruct()
10: {
11: $c=get_class($this); unset($c);
12: echo get_class($this) ."\n";
13: if(defined('DEBUG_'.__CLASS__)){}
14: $c=get_class($this); //memory leak only
15: echo $this->error;
16: }
17: }
18:
19:
20: BUG::instance()->error;
21: echo "this is still executed\n";
22: ?>
23: --EXPECT--
24: BUG
25: please fix this thing, it wasted a nice part of my life!
26: this is still executed
27:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>