Bug #3881: Can not create an object specifying another object variable as class name

From: Date: Mon, 20 Mar 2000 08:31:05 +0000
Subject: Bug #3881: Can not create an object specifying another object variable as class name
Groups: php.dev 
Request: Send a blank email to php-dev+get-17079@lists.php.net to get a copy of this message
From: mlemos@acm.org Operating system: Linux RH 6.0 PHP version: 3.0.15 PHP Bug Type: Misbehaving function Bug description: Can not create an object specifying another object variable as class name If I specify to new an object instance variabe as class name of another object it gives me the error below. Try the script below under PHP 3. PHP 4 does not have this problem. Fatal error: Object is not a class in test.php on line 10 <? class some_class { var $variable="some_class"; }; $object=new some_class; $variable=$object->variable; $another_object=new $variable; $another_object=new $object->variable; ?>

« previous php.dev (#17079) next »