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
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: mweis at durp dot com
New email:
PHP Version: OS:

 

 [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: Fri May 10 12:01:32 2024 UTC