3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $name=array("raj","ram","pooja"); $rel=array("brother","father"); $array=array(); for($i=0;$i<sizeof($name);$i++) { if($i<(sizeof($name)-1)) echo "".$name[$i]." ".$rel[$i]." ".$name[$i+1]."<br>"; $arrays = $name[$i]." ".$rel[$i]." ".$name[$i+1]; array_push($array, $arrays); }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
raj brother ram<br>ram father pooja<br> Notice: Undefined offset: 2 in /in/uvRRB on line 10 Notice: Undefined offset: 3 in /in/uvRRB on line 10
Output for hhvm-3.10.0 - 3.12.0
raj brother ram<br>ram father pooja<br> Notice: Undefined index: 2 in /in/uvRRB on line 10 Notice: Undefined index: 3 in /in/uvRRB on line 10
Output for 4.3.0 - 5.2.17
raj brother ram<br>ram father pooja<br> Notice: Undefined offset: 2 in /in/uvRRB on line 10 Notice: Undefined offset: 3 in /in/uvRRB on line 10