3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (phpversion() != '7.0.0') { die; } $ids = []; for($i=0; $i<300000; $i++) { $time = time(); $randomString1 = bin2hex(random_bytes(20)); $randomString2 = bin2hex(random_bytes(10)); $ids[] = md5($time.$randomString1.$randomString2); } $a = array_count_values($ids); asort($a); var_dump( $a[key($a)] );

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.3.120.0030.01314.84
7.3.110.0000.01714.90
7.3.100.0030.01014.55
7.3.90.0050.00514.75
7.3.80.0090.00614.74
7.3.70.0060.00914.80
7.3.60.0060.01014.47
7.3.50.0030.01414.73
7.3.40.0060.01014.84
7.3.30.0070.01014.84
7.3.20.0070.00716.73
7.3.10.0090.00316.55
7.3.00.0030.00916.37
7.2.240.0040.00814.95
7.2.230.0100.00715.02
7.2.220.0080.00814.88
7.2.210.0040.01114.98
7.2.200.0000.01115.11
7.2.190.0000.01514.94
7.2.180.0000.01614.97
7.2.170.0090.00615.08
7.2.160.0120.00414.77
7.2.150.0070.00716.84
7.2.140.0040.01116.94
7.2.130.0050.00916.56
7.2.120.0090.00716.46
7.2.110.0070.00816.57
7.2.100.0030.01016.64
7.2.90.0190.00316.52
7.2.80.0110.00516.41
7.2.70.0110.00816.83
7.2.60.0060.00916.74
7.2.50.0090.00716.75
7.2.40.0070.00916.78
7.2.30.0130.01216.81
7.2.20.0120.00616.61
7.2.10.0090.01216.63
7.2.00.0040.01117.60
7.1.330.0120.00615.62
7.1.320.0060.00915.97
7.1.310.0070.00715.74
7.1.300.0110.00415.61
7.1.290.0070.00315.65
7.1.280.0030.01015.64
7.1.270.0040.01115.66
7.1.260.0070.00715.44
7.1.250.0060.00615.54
7.1.200.0090.00315.77
7.1.100.0060.00618.28
7.1.70.0080.00016.78
7.1.60.0100.01319.52
7.1.50.0100.00716.95
7.1.00.0070.07322.43
7.0.200.0110.00316.69
7.0.90.0200.07019.96
7.0.80.0200.07019.93
7.0.70.0070.07019.88
7.0.60.0200.07319.90
7.0.50.0100.07020.18
7.0.40.0030.08320.15
7.0.30.0100.08020.08
7.0.20.0100.07720.18
7.0.10.0070.08320.03
7.0.01.4570.36046.04
5.6.280.0030.03020.86
5.6.240.0070.07320.70
5.6.230.0130.06320.50
5.6.220.0100.07020.61
5.6.210.0130.06320.66
5.6.200.0070.04021.05
5.6.190.0170.05021.17
5.6.180.0070.08320.95
5.6.170.0070.08021.11
5.6.160.0070.07020.91
5.6.150.0100.07721.06
5.6.140.0070.08021.07
5.6.130.0030.06321.04
5.6.120.0170.07020.93
5.6.110.0030.09020.94
5.6.100.0070.08321.15
5.6.90.0070.06721.07
5.6.80.0170.07020.40
5.6.70.0200.07020.48
5.6.60.0070.07720.41
5.6.50.0130.03320.51
5.6.40.0000.08720.41
5.6.30.0130.07320.33
5.6.20.0070.08320.39
5.6.10.0100.05020.43
5.6.00.0100.07320.30
5.5.380.0070.08020.37
5.5.370.0100.07720.35
5.5.360.0130.07020.41
5.5.350.0200.07320.43
5.5.340.0100.05320.61
5.5.330.0070.10320.83
5.5.320.0170.07320.64
5.5.310.0000.09320.88
5.5.300.0070.08020.79
5.5.290.0100.08320.82
5.5.280.0070.07020.88
5.5.270.0070.08320.79
5.5.260.0030.09020.72
5.5.250.0000.09020.43
5.5.240.0100.08020.10
5.5.230.0000.04720.25
5.5.220.0070.08020.13
5.5.210.0100.07720.22
5.5.200.0100.08020.14
5.5.190.0000.08720.17
5.5.180.0100.08320.27
5.5.160.0130.03320.23
5.5.150.0070.04720.11
5.5.140.0070.07720.18
5.5.130.0070.08020.22
5.5.120.0070.04320.20
5.5.110.0030.04020.13
5.5.100.0000.05020.13
5.5.90.0030.04320.12
5.5.80.0030.05720.07
5.5.70.0070.03720.15
5.5.60.0030.04020.14
5.5.50.0100.03720.09
5.5.40.0100.03320.14
5.5.30.0030.04020.00
5.5.20.0030.04020.07
5.5.10.0030.04320.03
5.5.00.0030.04019.96

preferences:
40.74 ms | 400 KiB | 5 Q