3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hashes = array_map(function ($num) { return substr(sha1($num), 0, 8); }, range(0, 100000)); print_r(array_slice($hashes, 0, 10)); if (array_unique($hashes) == $hashes) { echo 'all unique'; } else { echo 'collisions detected'; }

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)
8.3.60.0270.05428.12
8.3.50.0360.06128.12
8.3.40.0200.04730.31
8.3.30.0200.05030.41
8.3.20.0140.02830.52
8.3.10.0140.02430.51
8.3.00.0160.06231.30
8.2.180.0420.05528.45
8.2.170.0290.04230.73
8.2.160.0070.04933.61
8.2.150.0030.03430.71
8.2.140.0200.04630.52
8.2.130.0070.02334.09
8.2.120.0240.02429.62
8.2.110.0090.02834.23
8.2.100.0230.02930.32
8.2.90.0130.03229.66
8.2.80.0030.04530.70
8.2.70.0100.03829.53
8.2.60.0070.04029.84
8.2.50.0000.04529.78
8.2.40.0100.03331.41
8.2.30.0130.04629.63
8.2.20.0100.04729.54
8.2.10.0070.03729.88
8.2.00.0190.02829.63
8.1.280.0130.05335.77
8.1.270.0140.02437.11
8.1.260.0000.03238.23
8.1.250.0100.03235.85
8.1.240.0130.02638.84
8.1.230.0320.02532.67
8.1.220.0100.03832.63
8.1.210.0070.04232.32
8.1.200.0070.04332.45
8.1.190.0030.04832.33
8.1.180.0140.03832.32
8.1.170.0200.02732.45
8.1.160.0030.04633.96
8.1.150.0130.03833.66
8.1.140.0130.03932.39
8.1.130.0100.03733.64
8.1.120.0200.03032.44
8.1.110.0100.04032.35
8.1.100.0100.03732.49
8.1.90.0030.04432.42
8.1.80.0100.03632.42
8.1.70.0100.03732.41
8.1.60.0130.03732.67
8.1.50.0100.03832.53
8.1.40.0100.04032.49
8.1.30.0230.04232.62
8.1.20.0240.04132.53
8.1.10.0000.04832.54
8.1.00.0060.04232.36
8.0.300.0070.03833.55
8.0.290.0140.03431.47
8.0.280.0070.04433.52
8.0.270.0100.04032.10
8.0.260.0100.03731.52
8.0.250.0070.04331.74
8.0.240.0100.04031.82
8.0.230.0140.03631.70
8.0.220.0090.03831.70
8.0.210.0100.03731.60
8.0.200.0200.02931.70
8.0.190.0030.04431.85
8.0.180.0200.04831.81
8.0.170.0100.04231.77
8.0.160.0310.03731.72
8.0.150.0160.03931.71
8.0.140.0100.04331.71
8.0.130.0130.04728.26
8.0.120.0160.03931.70
8.0.110.0070.04631.83
8.0.100.0130.03531.76
8.0.90.0100.03731.58
8.0.80.0370.06731.73
8.0.70.0130.03731.76
8.0.60.0100.04731.61
8.0.50.0030.04831.75
8.0.30.0260.05931.55
8.0.20.0170.07931.84
8.0.10.0170.03331.73
8.0.00.0330.08831.66
7.4.330.0100.03527.91
7.4.320.0130.03331.35
7.4.300.0130.03731.32
7.4.290.0060.04231.40
7.4.280.0190.04231.38
7.4.270.0130.03731.26
7.4.260.0070.04728.21
7.4.250.0070.04931.46
7.4.240.0100.03731.33
7.4.230.0070.03931.43
7.4.220.0160.11831.52
7.4.210.0250.07131.25
7.4.200.0030.04631.30
7.4.190.0100.04431.30
7.4.160.0230.06631.46
7.4.150.0380.12331.31
7.4.140.0420.11831.29
7.4.130.0340.10931.49
7.4.120.0490.11131.51
7.4.110.0270.08531.43
7.4.100.0160.07831.47
7.4.90.0330.06631.27
7.4.80.0330.11431.32
7.4.70.0410.10631.41
7.4.60.0240.07131.34
7.4.50.0100.05031.25
7.4.40.0100.06831.07
7.4.30.0340.06131.19
7.4.00.0200.05729.74
7.3.330.0130.04228.17
7.3.320.0160.03328.27
7.3.310.0170.03030.89
7.3.300.0070.04031.04
7.3.290.0190.09931.13
7.3.280.0160.07731.00
7.3.270.0290.06531.34
7.3.260.0300.07031.30
7.3.240.0340.06431.27
7.3.230.0230.07031.35
7.3.210.0200.08131.05
7.3.200.0200.08031.19
7.3.190.0450.05531.39
7.3.180.0350.07830.97
7.3.170.0340.11131.14
7.3.160.0160.08031.19
7.3.120.0130.06729.67
7.2.330.0360.06831.07
7.2.320.0230.08331.09
7.2.310.0260.07630.74
7.2.300.0330.06631.14
7.2.290.0290.07231.07
7.2.00.0000.06637.28
7.1.100.8400.08329.95
7.1.70.0000.08432.82
7.1.60.0170.13133.04
7.1.50.0170.11032.71
7.1.00.0000.10337.97
7.0.200.7130.09728.88
7.0.140.0070.17337.88
7.0.120.0030.10737.84
7.0.60.0230.16733.45
7.0.50.0170.15731.38
7.0.40.0130.18329.64
7.0.30.0770.16729.58
7.0.20.0570.15729.63
7.0.10.0270.13729.63
7.0.00.0100.11729.56
5.6.280.0170.28053.43
5.6.210.0470.25353.25
5.6.200.0330.26350.66
5.6.190.0100.23052.82
5.6.180.0430.19353.00
5.6.170.0330.25053.18
5.6.160.0130.27352.85
5.6.150.0300.26750.74
5.6.140.0170.26750.66
5.6.130.0130.28350.64
5.6.120.0170.22353.42
5.6.110.0200.25053.52
5.6.100.0200.27053.50
5.6.90.0230.27753.61
5.6.80.0130.28352.80
5.6.70.0100.22352.92
5.5.350.0300.25753.04
5.5.340.0170.22050.48
5.5.330.0270.26752.67
5.5.320.0500.22052.65
5.5.310.0270.32052.63
5.5.300.0270.22750.48
5.5.290.0230.28350.50
5.5.280.0000.23053.28
5.5.270.0230.21053.35
5.5.260.0330.26353.28
5.5.250.0270.26053.20
5.5.240.0200.16752.75
5.4.450.0300.22751.42
5.4.440.0230.26051.13
5.4.430.0130.20351.32
5.4.420.0130.20051.28
5.4.410.0100.27351.28
5.4.400.0130.23751.19
5.4.390.0100.28051.06
5.4.380.0170.20350.92
5.4.370.0100.27350.93
5.4.360.0300.23051.18
5.4.350.0170.26750.92
5.4.340.0100.21350.93
5.4.320.0070.30350.85
5.4.310.0200.29050.79
5.4.300.0100.22051.18
5.4.290.0130.22351.07
5.4.280.0100.21051.05
5.4.270.0100.21051.16
5.4.260.0100.20750.93
5.4.250.0070.21350.98
5.4.240.0070.21051.16
5.4.230.0170.20350.93
5.4.220.0130.20751.31
5.4.210.0130.20050.96
5.4.200.0200.20050.96
5.4.190.0170.21050.89
5.4.180.0330.25350.81
5.4.170.0130.26051.08
5.4.160.0200.24351.15
5.4.150.0270.24350.79
5.4.140.0130.20348.41
5.4.130.0230.26048.32
5.4.120.0070.23748.41
5.4.110.0200.20048.36
5.4.100.0330.23348.27
5.4.90.0130.27048.41
5.4.80.0100.21348.23
5.4.70.0030.24748.50
5.4.60.0170.26048.22
5.4.50.0230.23748.33
5.4.40.0170.23048.54
5.4.30.0270.26048.43
5.4.20.0270.26348.22
5.4.10.0300.26348.36
5.4.00.0330.26047.84
5.3.290.0100.26346.98
5.3.280.0170.21747.05
5.3.270.0170.24747.08
5.3.260.0100.29047.01
5.3.250.0170.27746.97
5.3.240.0100.28747.01
5.3.230.0030.24746.99
5.3.220.0230.25347.04
5.3.210.0200.25346.97
5.3.200.0330.19347.01
5.3.190.0200.27747.00
5.3.180.0100.21346.98
5.3.170.0130.27346.89
5.3.160.0130.27047.03
5.3.150.0170.20747.01
5.3.140.0130.25746.88
5.3.130.0630.23746.97
5.3.120.0230.25747.00
5.3.110.0270.26347.00
5.3.100.0200.27046.36
5.3.90.0030.30046.48
5.3.80.0200.25746.42
5.3.70.0270.27746.37
5.3.60.0130.27346.43
5.3.50.0100.22746.20
5.3.40.0030.21346.29
5.3.30.0130.25346.25
5.3.20.0170.28345.94
5.3.10.0170.28045.90
5.3.00.0270.23745.86
5.2.170.0100.02310.96
5.2.160.0030.02711.00
5.2.150.0030.03011.00
5.2.140.0070.03011.07
5.2.130.0000.05011.27
5.2.120.0030.06711.03
5.2.110.0100.05711.03
5.2.100.0030.04011.00
5.2.90.0070.02711.04
5.2.80.0000.03711.09
5.2.70.0000.07011.07
5.2.60.0070.04710.94
5.2.50.0070.05710.90
5.2.40.0030.03010.90
5.2.30.0000.06010.86
5.2.20.0070.05010.94
5.2.10.0000.03710.86
5.2.00.0000.06010.69
5.1.60.0070.0509.94
5.1.50.0000.0539.97
5.1.40.0100.0479.97
5.1.30.0030.04710.34
5.1.20.0070.04310.21
5.1.10.0070.0509.91
5.1.00.0070.02310.21
5.0.50.0030.0408.54
5.0.40.0070.0178.42
5.0.30.0030.0508.19
5.0.20.0000.0208.34
5.0.10.0030.0208.18
5.0.00.0030.0378.20
4.4.90.0000.0207.95
4.4.80.0100.0237.95
4.4.70.0000.0377.95
4.4.60.0030.0337.95
4.4.50.0000.0377.95
4.4.40.0000.0577.95
4.4.30.0100.0307.95
4.4.20.0030.0337.95
4.4.10.0000.0337.95
4.4.00.0000.0307.95
4.3.110.0030.0177.95
4.3.100.0030.0337.95
4.3.90.0100.0107.95
4.3.80.0070.0277.95
4.3.70.0030.0277.95
4.3.60.0000.0207.95
4.3.50.0000.0177.95
4.3.40.0030.0477.95
4.3.30.0000.0377.95
4.3.20.0000.0337.95
4.3.10.0000.0207.95
4.3.00.0000.0377.95

preferences:
41.81 ms | 401 KiB | 5 Q