PHP 4.0 Bug #10068: referenced objects

From: Date: Fri, 30 Mar 2001 00:46:23 +0000
Subject: PHP 4.0 Bug #10068: referenced objects
Groups: php.dev 
Request: Send a blank email to php-dev+get-50317@lists.php.net to get a copy of this message
From: salna@ktl.mii.lt Operating system: win98, debian linux PHP version: 4.0.3pl1 PHP Bug Type: Reproduceable crash Bug description: referenced objects <? class objekt { var $property; function objekt() { $this->property = 'okey'; } function property() { echo "<br>$this->property"; } function &gb_objekt() { $obj =& $GLOBALS['gb_objekt']; if (get_class($obj) != 'objekt') { $obj = new objekt(); } return $obj; } } $gb_objekt =& objekt::gb_objekt(); // next line crashes $gb_objekt->property(); $objekt =& objekt::gb_objekt(); $objekt->property = 'more okey'; $objekt->property(); $gb_objekt->property(); ?> -- Edit Bug report at: http://bugs.php.net/?id=10068&edit=1

« previous php.dev (#50317) next »