3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? php $ar1=array(1,2,3,4,5); $ar2=array(11,22,33,44,55); $arr3=array(array_merge($arr1,$arr2); print_r($arr3); shuffle($arr3); echo"array is shuffed"; foreach($arr3 as $a) { echo"<br>",$a; } $str=implode(" and '),$ar3); echo"<br>after implode of array 4ar3 is <br> $str"; $str="india is our country"; echo"<br> explode example for 4str1 is </br>"; $country=explode("",$str1); print_r($country); $song="twinkle twinkle"; $songArray=explode(',',$song); echo"<br>after explode 3rd element is",$songArray[3]; ?>
Output for 5.3.0 - 5.4.32
<? php $ar1=array(1,2,3,4,5); $ar2=array(11,22,33,44,55); $arr3=array(array_merge($arr1,$arr2); print_r($arr3); shuffle($arr3); echo"array is shuffed"; foreach($arr3 as $a) { echo"<br>",$a; } $str=implode(" and '),$ar3); echo"<br>after implode of array 4ar3 is <br> $str"; $str="india is our country"; echo"<br> explode example for 4str1 is </br>"; $country=explode("",$str1); print_r($country); $song="twinkle twinkle"; $songArray=explode(',',$song); echo"<br>after explode 3rd element is",$songArray[3]; ?>