3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (phpversion() != '7.0.0') { die; } $ids = []; for($i=0; $i<100000; $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[0] );

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.4.00.0080.01114.86
7.3.120.0110.00814.73
7.3.110.0070.01214.83
7.3.100.0040.01314.61
7.3.90.0100.00614.54
7.3.80.0080.00814.86
7.3.70.0030.01014.67
7.3.60.0060.00814.81
7.3.50.0070.00914.65
7.3.40.0080.00514.79
7.3.30.0040.00814.73
7.3.20.0100.00516.66
7.3.10.0070.00916.72
7.3.00.0040.00916.54
7.2.250.0060.01115.16
7.2.240.0030.01714.85
7.2.230.0070.01015.03
7.2.220.0080.00714.92
7.2.210.0050.01014.78
7.2.200.0070.00814.91
7.2.190.0050.01014.71
7.2.180.0070.01214.88
7.2.170.0100.00215.02
7.2.130.0050.00516.64
7.2.120.0100.00716.88
7.2.110.0040.01216.63
7.2.100.0080.00416.80
7.2.90.0070.00716.89
7.2.80.0000.01016.61
7.2.70.0030.01416.85
7.2.60.0060.00716.82
7.2.50.0040.01116.72
7.2.40.0040.01116.82
7.2.30.0080.00616.84
7.2.20.0050.00516.88
7.2.10.0030.00616.50
7.2.00.0050.01018.23
7.1.330.0030.00915.60
7.1.320.0040.00815.55
7.1.310.0070.00915.74
7.1.300.0080.00915.69
7.1.290.0030.01415.52
7.1.280.0040.00815.36
7.1.270.0030.01115.73
7.1.260.0030.01115.59
7.1.250.0040.00515.77
7.1.200.0090.00315.47
7.1.100.0040.00718.18
7.1.70.0030.01316.81
7.1.60.0170.00719.52
7.1.50.0060.01516.95
7.1.00.0130.06722.32
7.0.200.0030.00716.69
7.0.90.0070.03320.03
7.0.80.0070.04719.93
7.0.70.0130.07019.93
7.0.60.0100.08019.99
7.0.50.0100.07720.34
7.0.40.0070.04320.08
7.0.30.0000.05020.07
7.0.20.0030.04319.95
7.0.10.0000.04319.99
7.0.00.4630.18327.06
5.6.280.0030.03320.90
5.6.240.0070.07320.66
5.6.230.0100.06020.69
5.6.220.0000.04720.73
5.6.210.0130.06020.74
5.6.200.0000.04021.03
5.6.190.0070.04021.10
5.6.180.0100.03721.02
5.6.170.0030.08321.16
5.6.160.0070.06721.01
5.6.150.0030.03721.00
5.6.140.0070.06020.98
5.6.130.0070.07721.00
5.6.120.0130.07721.13
5.6.110.0070.03320.93
5.6.100.0070.03321.00
5.6.90.0030.05020.98
5.6.80.0070.07720.46
5.6.70.0030.04320.45
5.6.60.0000.04320.41
5.6.50.0030.07320.44
5.6.40.0170.02320.32
5.6.30.0070.06320.46
5.6.20.0070.03320.40
5.6.10.0070.06720.39
5.6.00.0030.04020.29
5.5.380.0070.07720.45
5.5.370.0070.08020.34
5.5.360.0030.07720.38
5.5.350.0000.05320.44
5.5.340.0070.07720.86
5.5.330.0030.04020.92
5.5.320.0070.04720.92
5.5.310.0030.06720.92
5.5.300.0000.07020.82
5.5.290.0170.06320.93
5.5.280.0070.04020.77
5.5.270.0100.03020.86
5.5.260.0030.08020.81
5.5.250.0130.07020.45
5.5.240.0030.08720.30
5.5.230.0000.03720.25
5.5.220.0030.03320.25
5.5.210.0030.05020.10
5.5.200.0030.03320.23
5.5.190.0030.06020.23
5.5.180.0100.07319.95
5.5.160.0030.03320.23
5.5.150.0030.04320.17
5.5.140.0070.03020.27
5.5.130.0130.02720.27
5.5.120.0100.03720.28
5.5.110.0030.08020.13
5.5.100.0070.06020.13
5.5.90.0130.02719.96
5.5.80.0100.02719.91
5.5.70.0070.07020.05
5.5.60.0070.06720.14
5.5.50.0130.06320.08
5.5.40.0030.07020.02
5.5.30.0000.04019.92
5.5.20.0000.04320.03
5.5.10.0030.04020.08
5.5.00.0000.03720.02

preferences:
36.2 ms | 400 KiB | 5 Q