3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1, 500000); $startTime = microtime(true); array_rand($range,2); echo "Time: " . number_format(( microtime(true) - $startTime), 4) . " Seconds\n";

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.00.0060.01235.32
7.1.70.0110.01132.85
7.1.60.0100.02433.20
7.1.50.0190.02232.80
7.1.00.0070.07338.21
7.0.200.0190.00632.38
7.0.140.0070.08338.07
7.0.60.0030.08335.12
7.0.50.0170.09032.95
7.0.40.0300.08035.07
7.0.30.0430.04735.09
7.0.20.0570.08335.15
7.0.10.0070.05334.95
7.0.00.0130.09334.92
5.6.280.0370.10785.73
5.6.210.0470.11085.13
5.6.200.0270.09382.80
5.6.190.0230.09085.10
5.6.180.0470.10784.97
5.6.170.0330.07085.03
5.6.160.0330.06784.91
5.6.150.0200.08782.82
5.6.140.0200.08382.71
5.6.130.0330.11082.56
5.6.120.0300.12385.66
5.6.110.0270.10785.61
5.6.100.0430.11385.74
5.6.90.0200.08785.58
5.6.80.0200.12085.02
5.6.70.4330.05785.04
5.5.350.0330.06085.08
5.5.340.0330.12082.54
5.5.330.0270.11784.84
5.5.320.0400.09384.64
5.5.310.0600.10784.79
5.5.300.0230.09782.60
5.5.290.0330.07082.52
5.5.280.0430.10085.60
5.5.270.0270.13385.50
5.5.260.0270.10085.28
5.5.250.0230.09785.22
5.5.240.0500.10785.00
5.4.450.0300.10083.96
5.4.440.0500.09783.75
5.4.430.0330.08083.95
5.4.420.0700.09783.92
5.4.410.0330.07783.70
5.4.400.0800.08383.82
5.4.390.0900.09083.83
5.4.380.0870.10783.40
5.4.370.0930.10083.23
5.4.360.0800.10083.34
5.4.350.0630.11083.22
5.4.340.1100.12383.37
5.4.320.0240.06577.17
5.4.310.0250.06677.17
5.4.300.0240.06477.18
5.4.290.0210.06977.17
5.4.280.0220.07177.07
5.4.270.0250.07277.07
5.4.260.0280.06777.07
5.4.250.0230.07177.07
5.4.240.0210.07177.07
5.4.230.0240.07177.06
5.4.220.0250.06677.06
5.4.210.0250.06777.06
5.4.200.0180.07277.06
5.4.190.0270.06377.05
5.4.180.0170.07577.05
5.4.170.0170.07577.07
5.4.160.0230.06777.06
5.4.150.0230.07477.06
5.4.140.0240.07276.74
5.4.130.0220.06676.73
5.4.120.0230.07376.69
5.4.110.0270.06976.68
5.4.100.0240.07076.68
5.4.90.0280.07576.68
5.4.80.0240.07676.69
5.4.70.0300.06676.68
5.4.60.0210.07076.68
5.4.50.0180.06976.68
5.4.40.0210.06776.67
5.4.30.0220.06876.67
5.4.20.0280.06876.67
5.4.10.0330.08576.67
5.4.00.0250.07576.16
5.3.290.0260.06676.08
5.3.280.0220.06776.01
5.3.270.0190.07476.02
5.3.260.0210.07876.02
5.3.250.0180.07376.02
5.3.240.0240.06776.02
5.3.230.0180.07376.01
5.3.220.0260.06375.98
5.3.210.0250.08175.98
5.3.200.0300.08475.97
5.3.190.0370.09475.98
5.3.180.0350.09675.98
5.3.170.0240.09375.97
5.3.160.0250.07875.98
5.3.150.0310.08275.98
5.3.140.0250.07275.96
5.3.130.0320.07575.96
5.3.120.0280.09475.96
5.3.110.0280.08975.96
5.3.100.0260.08375.45
5.3.90.0170.07975.43
5.3.80.0270.07675.42
5.3.70.0310.09375.43
5.3.60.0180.08775.41
5.3.50.0230.08775.36
5.3.40.0190.08075.35
5.3.30.0290.07275.32
5.3.20.0240.08275.10
5.3.10.0230.07875.06
5.3.00.0220.07675.04
5.2.170.0220.06373.66
5.2.160.0270.07373.05
5.2.150.0230.07573.05
5.2.140.0220.06973.05
5.2.130.0190.06373.01
5.2.120.0270.06373.01
5.2.110.0210.06073.01
5.2.100.0230.05973.01
5.2.90.0200.06873.01
5.2.80.0260.06573.00
5.2.70.0300.06773.01
5.2.60.0230.06172.95
5.2.50.0360.07272.94
5.2.40.0210.08772.92
5.2.30.0240.08472.88
5.2.20.0240.08672.87
5.2.10.0210.06772.79
5.2.00.0260.07073.69
5.1.60.0360.08595.76
5.1.50.0200.09795.76
5.1.40.0360.12495.74
5.1.30.0340.11296.09
5.1.20.0300.09496.11
5.1.10.0260.09495.84
5.1.00.0180.10695.84
5.0.50.0270.08994.32
5.0.40.0310.09694.17
5.0.30.0380.11093.99
5.0.20.0240.11593.96
5.0.10.0280.12793.93
5.0.00.0230.09693.93
4.4.90.0310.08492.36
4.4.80.0270.08892.34
4.4.70.0300.09792.33
4.4.60.0270.09492.34
4.4.50.0280.07192.35
4.4.40.0270.09092.34
4.4.30.0220.09392.34
4.4.20.0230.08492.61
4.4.10.0220.08092.61
4.4.00.0220.09492.38
4.3.110.0220.08192.28
4.3.100.0210.08692.27
4.3.90.0190.07992.25
4.3.80.0270.08092.25
4.3.70.0240.08092.24
4.3.60.0200.09092.25
4.3.50.0240.08892.24
4.3.40.0220.08992.20
4.3.30.0250.08591.23
4.3.20.0250.08290.99
4.3.10.0240.07990.94
4.3.00.0230.11792.11

preferences:
38.4 ms | 401 KiB | 5 Q