3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = 'var'; $name = 'test' . $test; $testvar = array(); $$name[] = 3; // Add something to $testvar var_dump($testvar);
based on B6kka
Output for 7.0.0 - 7.1.7
array(1) { [0]=> int(3) }
Output for 4.3.2 - 5.6.28
Fatal error: Cannot use [] for reading in /in/mtcRU on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot use [] for reading in /in/mtcRU on line 7