3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php $integers = [1, 99]; $intRes = 0; foreach ($integers as $iValue) { $intRes += $iValue; } $floats = [0.01, 0.99]; $floatRes = 0; foreach ($floats as $fValue) { $floatRes += $fValue; } echo number_format($intRes / 100, 2); echo number_format($floatRes, 2); $array = [0.01, 0.99]; $sum = 0; foreach ($array as $value) { $sum += $value; } echo number_format($value, 2);

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.10.0100.07320.33
7.0.00.0030.04320.15
5.6.160.0030.07320.54
5.6.150.0170.06018.27
5.6.140.0030.06018.15
5.6.130.0000.06018.14
5.6.120.0100.07021.03
5.6.110.0200.07320.98
5.6.100.0030.04721.02
5.6.90.0130.07721.07
5.6.80.0130.07720.50
5.5.300.0070.08717.98
5.5.290.0100.03718.08
5.5.280.0000.09020.62
5.5.270.0070.05720.84
5.5.260.0230.06720.75
5.5.250.0030.07720.57
5.5.240.0100.08720.26

preferences:
138.98 ms | 1394 KiB | 7 Q