php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11512 Parsing of vars inside a string
Submitted: 2001-06-16 03:16 UTC Modified: 2001-06-16 12:04 UTC
From: luci at conexim dot com dot au Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.5 OS: RH Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: luci at conexim dot com dot au
New email:
PHP Version: OS:

 

 [2001-06-16 03:16 UTC] luci at conexim dot com dot au
$varone="blah";
$vartwo="$varone_foo";

=> The resulting contents of $vartwo is not "blah_foo" as expected. You can only get the desired result by having $vartwo= $varone . "_foo";

However something like $vartwo="foo_$varone" works as expected => "foo_blah";

Is this a language construct issue perhaps?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-16 12:04 UTC] sniper@php.net
No, _ is allowed in variable names.
$varone_foo is thought to be a variable.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 00:01:29 2025 UTC