#23643 [NEW]: Parse error when instancing object from a class property
| From: | php at schlueters dot de | Date: | Thu, 15 May 2003 15:04:57 +0000 |
| Subject: | #23643 [NEW]: Parse error when instancing object from a class property | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-39707@lists.php.net to get a copy of this message | ||
From: php at schlueters dot de
Operating system: Linux 2.4.20
PHP version: 5CVS-2003-05-15 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: Parse error when instancing object from a class property
I'm running this script using different php5 snapshots and current
php5-CVS-Versions:
<?php
class myclass {
var $name = 'myclass';
}
$object1 = new myclass();
$object2 = new $object1->name(); // Parse error
?>
Gives a parse error at the marked line but
<?php
$name = $object1->name;
$object2 = new $name();
?>
works.
--
Edit bug report at http://bugs.php.net/?id=23643&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23643&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23643&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23643&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23643&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23643&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23643&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23643&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23643&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23643&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23643&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23643&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23643&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23643&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23643&r=gnused