3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var1 = '321'; echo $var1; // will be '321' obviously my_function(); function my_function() { $var1 = '123'; $var2 = 'abc'; return $var1; } echo $var1; // will be '123'
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.2.0
321321
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/3dAVh on line 12
Process exited with code 255.