php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #5127 can
Submitted: 2000-06-19 16:57 UTC Modified: 2002-01-28 17:01 UTC
From: waldschrott at kiffen dot de Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (19/06/2000) OS: win2000/all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: waldschrott at kiffen dot de
New email:
PHP Version: OS:

 

 [2000-06-19 16:57 UTC] waldschrott at kiffen dot de
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...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-28 17:01 UTC] yohgaki@php.net
These will not be implemented probably.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 20:03:37 2021 UTC