Bug #73167 [Nab]: there is a bug in variable variables

From: Date: Sun, 25 Sep 2016 19:31:52 +0000
Subject: Bug #73167 [Nab]: there is a bug in variable variables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204256@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: yohgaki@php.net Reported by: karemmm21 at yahoo dot com Summary: there is a bug in variable variables 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: https://3v4l.org/29Khi Interestingly, HHVM fails. It may be 3v4l problem, though. Previous Comments: ------------------------------------------------------------------------ [2016-09-25 13:53:01] nikic@php.net You've included a "<br />" in the variable name -- probably it was supposed to go on the next line? ------------------------------------------------------------------------ [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

« previous php.bugs (#204256) next »