|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-28 17:01 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
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...