php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7938 string problem with interpretation of variable-names
Submitted: 2000-11-23 04:46 UTC Modified: 2000-11-23 07:33 UTC
From: mweis at durp dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.1pl2 OS: RedHat Linux 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
9 + 30 = ?
Subscribe to this entry?

 
 [2000-11-23 04:46 UTC] mweis at durp dot com
Try this ... is not really a bug because a "_" can be part of a variable-name.

$var1="1";
$var2="2";

echo "$var1-$var2". "\n<br>";
//delivers: 1-2

echo "$var1_$var2" . "\n<br>";
//delivers: 2 ????????????????

echo "$var1\_$var2". "\n<br>";
//delivers: 1\_2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-23 07:33 UTC] stas@php.net
Yes, exactly: this is not really a bug because a "_" can be
part of a variable-name.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 20:01:30 2024 UTC