3v4l.org

run code in 300+ PHP versions simultaneously
<?php $memory1 = memory_get_usage(true); print 'before: ' . $memory1 ."\n"; $keys = array(); for ($i = 0; $i<100000; $i++) { $keys[] = 'pref:keyname:' . rand(1000000, 19999999); } asort($keys); $memory2 = memory_get_usage(true); print 'after: ' . $memory2 ."\n"; print 'allocated: ' . ($memory2 - $memory1);

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.0030.07831.36
7.1.70.0420.06529.01
7.1.60.0100.12429.49
7.1.50.0160.11229.00
7.1.00.0030.17034.36
7.0.200.0900.07725.51
7.0.140.0100.14034.07
7.0.60.0030.14033.75
7.0.50.0100.15028.40
7.0.40.0070.17025.82
7.0.30.0330.10726.43
7.0.20.0500.10325.52
7.0.10.0370.16025.74
7.0.00.0130.12025.77
5.6.280.0130.25339.68
5.6.210.0470.22039.19
5.6.200.0300.22036.81
5.6.190.0070.20338.98
5.6.180.0330.20739.09
5.6.170.0370.24338.88
5.6.160.0200.25339.06
5.6.150.0270.23736.72
5.6.140.0230.22036.76
5.6.130.0100.25336.75
5.6.120.0130.21739.68
5.6.110.0100.25339.68
5.6.100.0170.25339.61
5.6.90.0170.24339.63
5.6.80.0100.26039.01
5.5.350.0270.19039.05
5.5.340.0100.20736.52
5.5.330.0130.25038.75
5.5.320.0230.19038.72
5.5.310.0300.24038.68
5.5.300.0200.21336.53
5.5.290.0200.25036.52
5.5.280.0070.21039.40
5.5.270.0130.18039.36
5.5.260.0200.18339.41
5.5.250.0370.20039.21
5.5.240.3630.18338.83
5.4.450.0800.27337.92
5.4.440.1000.36038.35
5.4.430.0930.32037.98
5.4.420.1270.40737.97
5.4.410.1130.39038.07
5.4.400.0370.34037.41
5.4.390.0500.35337.16
5.4.380.0470.34337.09
5.4.370.0130.32037.14
5.4.360.0270.26037.09
5.4.350.0140.31730.61
5.4.340.0100.28430.61
5.4.320.0120.19631.09
5.4.310.0170.20531.09
5.4.300.0060.20731.09
5.4.290.0130.21031.09
5.4.280.0110.23330.98
5.4.270.0130.19930.99
5.4.260.0110.20930.99
5.4.250.0130.38037.51
5.4.240.0230.31037.41
5.4.230.0230.31037.41
5.4.220.0170.40337.33
5.4.210.0200.29037.23
5.4.200.0200.42737.52
5.4.190.0070.33337.26
5.4.180.0170.32737.45
5.4.170.0200.40337.21
5.4.160.0300.41037.20
5.4.150.0170.32737.38
5.4.140.0200.34334.88
5.4.130.0130.28734.98
5.4.120.0170.30335.05
5.4.110.0200.39035.05
5.4.100.0270.31034.89
5.4.90.0170.41034.89
5.4.80.0300.32734.96
5.4.70.0230.33334.76
5.4.60.0200.38735.03
5.4.50.0270.36734.94
5.4.40.0200.35335.00
5.4.30.0300.34334.83
5.4.20.0170.38335.02
5.4.10.0070.34035.03
5.4.00.0030.33334.37
5.3.290.0080.22231.06
5.3.280.0270.38032.92
5.3.270.0230.34032.84
5.3.260.0170.31732.83
5.3.250.0200.49032.93
5.3.240.0230.38032.66
5.3.230.0130.33032.57
5.3.220.0170.46732.89
5.3.210.0170.47332.80
5.3.200.0130.39032.81
5.3.190.0200.49732.62
5.3.180.0230.42032.69
5.3.170.0200.30732.70
5.3.160.0200.34732.69
5.3.150.0200.34332.81
5.3.140.0200.32332.59
5.3.130.0230.40332.78
5.3.120.0230.32732.78
5.3.110.0170.39032.79
5.3.100.0200.33332.14
5.3.90.0400.33032.10
5.3.80.0200.34732.26
5.3.70.0170.28732.05
5.3.60.0230.29732.21
5.3.50.0130.31332.18
5.3.40.0130.42332.00
5.3.30.0170.34732.00
5.3.20.0230.33331.78
5.3.10.0170.36031.88
5.3.00.0130.39731.84
5.2.170.0030.29728.46
5.2.160.0130.41728.46
5.2.150.0170.33728.79
5.2.140.0170.40728.49
5.2.130.0100.64328.52
5.2.120.0200.36328.38
5.2.110.0130.39728.56
5.2.100.0200.36328.42
5.2.90.0370.41728.38
5.2.80.0070.31728.38
5.2.70.0230.35728.44
5.2.60.0170.40728.59
5.2.50.0170.37028.45
5.2.40.0070.38728.42
5.2.30.0070.37328.43
5.2.20.0130.35028.57
5.2.10.0270.46028.32
5.2.00.0070.04710.72
5.1.60.0030.0379.88
5.1.50.0070.03310.14
5.1.40.0100.04710.00
5.1.30.0070.04010.50
5.1.20.0070.03710.27
5.1.10.0030.0439.91
5.1.00.0070.0439.99
5.0.50.0100.0338.50
5.0.40.0100.0238.45
5.0.30.0030.0438.25
5.0.20.0030.0278.25
5.0.10.0030.0308.25
5.0.00.0070.0408.39
4.4.90.0030.0238.25
4.4.80.0070.0178.25
4.4.70.0070.0238.25
4.4.60.0030.0238.25
4.4.50.0030.0238.25
4.4.40.0030.0308.25
4.4.30.0030.0208.25
4.4.20.0100.0338.25
4.4.10.0030.0338.25
4.4.00.0030.0338.25
4.3.110.0000.0308.25
4.3.100.0030.0208.25
4.3.90.0000.0238.25
4.3.80.0000.0438.25
4.3.70.0000.0238.25
4.3.60.0100.0138.25
4.3.50.0100.0238.25
4.3.40.0100.0278.25
4.3.30.0070.0178.25
4.3.20.0030.0238.25
4.3.10.0070.0238.25
4.3.00.0000.0235.84

preferences:
26.44 ms | 403 KiB | 5 Q