1.2.1430. Variable Variables¶
A variable variable takes the value of a variable and treats that as the name of a variable.
PHP has the ability to dynamically use a variable.
They are also called ‘dynamic variable’.
<?php
// Normal variable
$a = 'b';
$b = 'c';
// Variable variable
$d = $$b;
// Variable variable in string
$d = "$\{$b\}";
?>
See also Variable variables.
1.2.1430.1. Connex PHP features¶
1.2.1430.1.1. Specs¶
Short name |
Variables/VariableVariables |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |