Annotation of embedaddon/php/Zend/tests/bug39346.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #39346 (Unsetting a static variable inside a destructor causes segfault later on)
3: --FILE--
4: <?php
5: class test
6: {
7: protected $_id;
8: static $instances;
9:
10: public function __construct($id) {
11: $this->_id = $id;
12: self::$instances[$this->_id] = $this;
13: }
14:
15: function __destruct() {
16: unset(self::$instances[$this->_id]);
17: }
18: }
19: $test = new test(2);
20: $test = new test(1);
21: $test = new test(2);
22: $test = new test(3);
23: echo "ok\n";
24: ?>
25: --EXPECT--
26: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>