php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joker at telenetz dot com
New email:
PHP Version: OS:

 

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

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

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

is this a bug or just an undocumented feature ?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-04 06:39 UTC] stas@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC