Bug #73167 [Opn->Nab]: there is a bug in variable variables
| From: | nikic@php.net | Date: | Sun, 25 Sep 2016 13:53:02 +0000 |
| Subject: | Bug #73167 [Opn->Nab]: there is a bug in variable variables | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204251@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73167&edit=1
ID: 73167
Updated by: nikic@php.net
Reported by: karemmm21 at yahoo dot com
Summary: there is a bug in variable variables
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: variable variables
PHP Version: 7.0.11
Block user comment: N
Private report: N
New Comment:
You've included a "<br />" in the variable name -- probably it was supposed to
go on the next line?
Previous Comments:
------------------------------------------------------------------------
[2016-09-25 13:24:58] karemmm21 at yahoo dot com
Description:
------------
$tirepr = 30;
$name = substr("tireqty",0,-3);
$xx = $name . "pr". "<br />";
echo $$xx;
// the result is Notice: Undefined variable: tirepr
Test script:
---------------
$tirepr = "30";
$name = substr("tireqty",0,-3);
$xx = $name . "pr". "<br />";
echo $$xx;
// the result is Notice: Undefined variable: tirepr
Expected result:
----------------
print 30
Actual result:
--------------
Notice: Undefined variable: tirepr
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73167&edit=1