3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $variableName = 123; // Create new variable with the name defined in variable $variableName ${$variableName} = 'MyValue'; //Outputs: string(7) "MyValue" var_dump($MyVariable); //Outputs: string(7) "MyValue" var_dump(${'MyVariable'});
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: MyVariable in /in/beYon on line 6 NULL Notice: Undefined variable: MyVariable in /in/beYon on line 8 NULL
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: MyVariable in /in/beYon on line 6 NULL Notice: Undefined variable: MyVariable in /in/beYon on line 8 NULL