Bug #75827 [Com]: Variables with space, how is it possible?
| From: | spam2 at rhsoft dot net | Date: | Wed, 17 Jan 2018 03:20:39 +0000 |
| Subject: | Bug #75827 [Com]: Variables with space, how is it possible? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213572@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75827&edit=1
ID: 75827
Comment by: spam2 at rhsoft dot net
Reported by: vini_000 at live dot com
Summary: Variables with space, how is it possible?
Status: Open
Type: Bug
Package: *General Issues
Operating System: Windows
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
thisis a *bugtracker* and not https://stackoverflow.com/
however:
$test = "testing test";
$$test = "5";
echo $$test;
echo "${'testing test'}";
Previous Comments:
------------------------------------------------------------------------
[2018-01-17 01:54:09] vini_000 at live dot com
Description:
------------
You can create variables with the name entered in another variable. But if the name has space, how
can you reference it?
Test script:
---------------
$test = "testing test";
$$test = "5";
echo $$test; // result: 5
echo $testing test //this can not
/*Now with a variable with no space*/
$test = "testing";
$$test = "5";
echo $testing; //result:5
echo $$test; //result:5
/*How can I reference a variable as an example (testing test)?*/
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75827&edit=1