ID: 5127 Updated by: yohgaki Old Summary: canīt use anything but a simple string with new (and var) Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Feature/Change Request Operating System: win2000/all PHP Version: 4.0 Latest CVS (19/06/2000) New Comment:
These will not be implemented probably. Previous Comments: ------------------------------------------------------------------------ [2000-06-19 16:57:22] [EMAIL PROTECTED] it not possible to use the statement new with anything but simple string itself or a simple string hold in a single variable try out: 1. works 2. uncommented first line, does not work 3. uncommented second line, does not work foreach ($this->active_parse_objects AS $object) { $classname=$this->active_parse_prefix.$object; $this->$object = new $classname; // $this->$object = new {$this->active_parse_prefix.$object}; // $this->$object = new $this->active_parse_prefix.$object; } Iīve also notived that itīs not possible to use the statement var with concated strings? if you want to use special chars like \n or \t in strings initzialized with var, youīve to use " because this is not possible class ... { var $test='asdfasdfasdf"ASDFASDF"ASDFAS'."\n"; } Iīm not sure whether the second part is a bug, but itīs making me dizzy escaping every " I want use in var-assigned string... ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=5127&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]