3v4l.org

run code in 300+ PHP versions simultaneously
<? 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.3.29, 5.4.0 - 5.4.32, 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<? 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 8.0.13
Parse error: syntax error, unexpected variable "$ar1" in /in/XXVlM on line 2
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected '$ar1' (T_VARIABLE) in /in/XXVlM on line 2
Process exited with code 255.

preferences:
176.01 ms | 401 KiB | 203 Q