3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('a','b','c','d'); $post = rand(0,3); echo $array[$pos];
based on 4FoSg
Output for 5.3.0 - 7.1.0
Notice: Undefined variable: pos in /in/efMU1 on line 4 Notice: Undefined index: in /in/efMU1 on line 4
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: pos in /in/efMU1 on line 4 Notice: Undefined index: in /in/efMU1 on line 4
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: pos in /in/efMU1 on line 4 Notice: Undefined index: in /in/efMU1 on line 4