php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13 Indirect vars don't work anymore
Submitted: 1998-01-27 04:53 UTC Modified: 1998-01-27 11:14 UTC
From: jan at nrw dot net Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0b3 OS: BSDI2.1
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: jan at nrw dot net
New email:
PHP Version: OS:

 

 [1998-01-27 04:53 UTC] jan at nrw dot net
The following works under php2, but fails under php3:

$a="b";
$b="Test!!";
echo "$$a";

Php3 says: "$b";
Php2 says: "Test!!";

This breaks nearly all my apps... :-/

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-01-27 11:14 UTC] rasmus
Not really a bug.  More like a change in behaviour.  The string embedded
variable handling in PHP3 only handles simple cases.  The way around
the problem is to use: echo "normal string stuff ".$$var." more string stuff";

We will however consider this report a "request for feature" ;)
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC