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
 [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

Pull Requests

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: Mon Dec 30 14:01:28 2024 UTC