|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8092 variables in strings not working
Submitted: 2000-12-04 06:35 UTC Modified: 2000-12-04 06:39 UTC
From: joker at telenetz dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0.3pl1 OS: linux 2.2.17
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: joker at telenetz dot com
New email:
PHP Version: OS:


 [2000-12-04 06:35 UTC] joker at telenetz dot com

the following script does not work:
$ab = "N6";
$test = "TESTSTRING";
$str = "test_$ab_$test";
echo "$str<BR>";
output: test_TESTSTRING

if i write:
$str = "test_".$ab."_$test";
the script works...

is this a bug or just an undocumented feature ?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-04 06:39 UTC]
Not a bug. '_' is the part of the identifier. Use "{$ab}_"
if you want it not to be a part of the identifier.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Jun 04 11:03:40 2023 UTC