1--TEST-- 2Bug #64720 (SegFault on zend_deactivate) 3--FILE-- 4<?php 5class 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 19class Foo { 20 public function __construct() { 21 Stat::getInstance(); 22 } 23} 24 25class ErrorTest { 26 private $trace; 27 public function __construct() { 28 $this->trace = debug_backtrace(1); 29 } 30} 31 32class Bar { 33 public function __destruct() { 34 Stat::getInstance(); 35 new ErrorTest(); 36 } 37 38 public function test() { 39 new ErrorTest(); 40 } 41} 42 43$foo = new Foo(); 44$bar = new Bar(); 45$bar->test(); 46?> 47--EXPECTF-- 48Fatal error: Uncaught Error: Access to undeclared static property: Stat::$requests in %sbug64720.php:12 49Stack trace: 50#0 [internal function]: Stat->__destruct() 51#1 {main} 52 thrown in %sbug64720.php on line 12 53