3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php $matriz1=array(25,67,50,0); $matriz2=array(1,3,7,9); $tam1=count($matriz1); $tam2=count($matriz2); if($tam1<>tam2) echo"los arrays tienen distinto tamaƱo"; else { for($i=0;$i<$tam1;$i++) { $suma[$i]=$matriz1[[$i]+$matriz2[$i]; } echo "El contenido de los arrays es:"; echo "Primer array:"; print_r($matriz1); echo "Segundo array:"; print_r($matriz2); echo "Array suma:"; print_r($suma); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.20.0300.05020.12
7.0.10.0130.08320.07
7.0.00.0100.08320.12
5.6.170.0470.06720.47
5.6.160.0070.08720.52
5.6.150.0100.08718.16
5.6.140.0030.04018.19
5.6.130.0030.04018.17
5.6.120.0030.04321.01
5.6.110.0170.07721.01
5.6.100.0130.07720.98
5.6.90.0100.08021.10
5.6.80.0030.04020.28
5.5.310.0300.07320.27
5.5.300.0100.08017.97
5.5.290.0000.08317.96
5.5.280.0100.08020.76
5.5.270.0100.07020.75
5.5.260.0170.07020.82
5.5.250.0130.08020.79
5.5.240.0170.06020.18

preferences:
131.02 ms | 1398 KiB | 7 Q