I hope everyone here knows the syntax of the php variable variable:
$color = 'red'; $red = 'yes, im red'; echo $$color; //output: 'yes, im red';
but my problem is: what is this syntax called? I am trying to find a link to php.net without any results (I want to know if this function will be stored in php6, other attributes, etc.)
Variable variables
And yes, this will be saved in PHP6, as far as I know.
Just to share some tips.
To avoid confusion, you can use curly braces.
${$color}
One of my team members deleted a double $, thinking of a typo error. Perhaps this will avoid confusion.
php , , /, .
Source: https://habr.com/ru/post/1706386/More articles:How to protect against password attacks without forwarding? - passwordsWPF rendering is ugly and blurry in Vista - windows-xpWhat is the best way to do unit testing for software that behaves differently for different users? - unit-testingC # Help convert this code from VB.NET to C # - c #Can you send a fax through ASP.NET without proprietary software? - vb.netSending a fax using .NET. - c #How to set host name on G1 phone - androidHow to make a mobile application stay on top? - .netIs the GROUP BY UNIQUE command computes all groups before applying the LIMIT clause? - sqlAbstract ElementType - javaAll Articles