3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = 'bar'; $bar = [ 'baz' => 'baz' ]; echo $$foo['baz'].PHP_EOL;
based on 2Rm8G
Output for 7.0.0 - 7.2.0
baz
Output for 5.4.0 - 5.6.28
Warning: Illegal string offset 'baz' in /in/Cs8Ah on line 8 Notice: Undefined variable: b in /in/Cs8Ah on line 8
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Cs8Ah on line 4
Process exited with code 255.