PHP 4.0 Bug #5127: can´t use anything but a simple string with new (and var)
| From: | waldschrott at kiffen dot de | Date: | Mon, 19 Jun 2000 14:57:22 +0000 |
| Subject: | PHP 4.0 Bug #5127: can´t use anything but a simple string with new (and var) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21738@lists.php.net to get a copy of this message | ||
From: waldschrott@kiffen.de
Operating system: win2000/all
PHP version: 4.0 Latest CVS (19/06/2000)
PHP Bug Type: Feature/Change Request
Bug description: can´t use anything but a simple string with new (and var)
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...