1
0
mirror of https://github.com/php/php-src.git synced 2026-04-13 19:14:16 +02:00
Files
archived-php-src/Zend/tests/bug68652.phpt
2015-04-06 18:11:41 +03:00

41 lines
788 B
PHP

--TEST--
Bug #68652 (segmentation fault in destructor)
--FILE--
<?php
class Foo {
private static $instance;
public static function getInstance() {
if (isset(self::$instance)) {
return self::$instance;
}
return self::$instance = new self();
}
public function __destruct() {
Bar::getInstance();
}
}
class Bar {
private static $instance;
public static function getInstance() {
if (isset(self::$instance)) {
return self::$instance;
}
return self::$instance = new self();
}
public function __destruct() {
Foo::getInstance();
}
}
$foo = new Foo();
?>
--EXPECTF--
Fatal error: Access to undeclared static property: Bar::$instance in %sbug68652.php on line %d