Annotation of embedaddon/php/Zend/tests/bug64720.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #64720 (SegFault on zend_deactivate)
3: --FILE--
4: <?php
5: class Stat {
6: private static $requests;
7: public static function getInstance() {
8: if (!isset(self::$requests[1])) {
9: self::$requests[1] = new self();
10: }
11: return self::$requests[1];
12: }
13:
14: public function __destruct() {
15: unset(self::$requests[1]);
16: }
17: }
18:
19: class Foo {
20: public function __construct() {
21: Stat::getInstance();
22: }
23: }
24:
25: class Error {
26: private $trace;
27: public function __construct() {
28: $this->trace = debug_backtrace(1);
29: }
30: }
31:
32: class Bar {
33: public function __destruct() {
34: Stat::getInstance();
35: new Error();
36: }
37:
38: public function test() {
39: new Error();
40: }
41: }
42:
43: $foo = new Foo();
44: $bar = new Bar();
45: $bar->test();
46: ?>
47: --EXPECTF--
48: Fatal error: Access to undeclared static property: Stat::$requests in %sbug64720.php on line 12
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>