3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php $ventas_dia = array (120.25, 85.05, 90.36, 98.95, 102.51, 79.17, 89.55, 80.69, 86.77, 115.85, 124.25, 92.24, 94.97, 112.73, 127.85, 100.05, 105.42, 91.12, 99.51, 95.63 ); $total = 0; for ($i=0; $i<=count($ventas_dia)-1; $i++) { $total += $ventas_dia[$i]; } $promedio = $total / count($ventas_dia); echo 'El promedio de ventas es: ' . $promedio; ?>

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.2.30.0310.01117.57
7.2.20.0100.01317.38
7.2.10.0130.01117.23
7.2.00.0120.01217.75
7.1.150.0120.01416.44
7.1.140.0180.01816.17
7.1.130.0110.01016.20
7.1.120.0080.01816.34
7.1.110.0120.01015.90
7.1.100.0090.01115.63
7.1.90.0160.00815.89
7.1.80.0150.00815.93
7.1.70.0190.00615.24
7.1.60.0350.01433.07
7.1.50.0370.01832.68
7.1.40.0250.01232.40
7.1.30.0310.00632.47
7.1.20.0270.01332.66
7.1.10.0080.00914.50
7.1.00.0220.01614.54

preferences:
140.12 ms | 1409 KiB | 7 Q