Created
August 1, 2013 19:15
-
-
Save sreed-ontraport/6134324 to your computer and use it in GitHub Desktop.
PHP Bug - Segfault in gc_zval_possible_root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ParentClass | |
{ | |
private static $_OBJECTS; | |
public static function Get() | |
{ | |
self::$_OBJECTS[1] = new ChildClass(); | |
return self::$_OBJECTS[1]; | |
} | |
} | |
class ChildClass extends ParentClass | |
{ | |
public $Manager; | |
function __construct() | |
{ | |
$this->Manager = $this; | |
} | |
public static function &GetCurrent() | |
{ | |
return ChildClass::Get(); | |
} | |
public static function &Get() | |
{ | |
return parent::Get(); | |
} | |
} | |
$staff = ChildClass::GetCurrent(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment