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[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.2.80.0060.00616.46
7.2.60.0030.01016.83
7.2.00.0040.00819.44
7.1.200.0040.01115.36
7.1.100.0040.00818.07
7.1.70.0040.00416.77
7.1.60.0070.01619.52
7.1.50.0000.01516.80
7.1.00.0100.06722.37
7.0.200.0030.00516.76
7.0.80.0570.07320.04
7.0.70.0530.08319.89
7.0.60.0600.08019.90
7.0.50.0430.06020.33
7.0.40.0200.07320.03
7.0.30.0100.04320.05
7.0.20.0100.05020.07
7.0.10.0100.04020.04
7.0.00.6370.18327.24
5.6.280.0030.03020.99
5.6.230.0100.07320.67
5.6.220.0170.07320.73
5.6.210.0100.07320.74
5.6.200.0100.03721.07
5.6.190.0070.08721.13
5.6.180.0070.08021.04
5.6.170.0130.07321.07
5.6.160.0200.06320.93
5.6.150.0100.07721.16
5.6.140.0170.07321.00
5.6.130.0170.07720.95
5.6.120.0100.08320.95
5.6.110.0030.05321.07
5.6.100.0100.04021.06
5.6.90.0030.08320.99
5.6.80.0030.06320.40
5.6.70.0030.06020.40
5.6.60.0030.05020.43
5.6.50.0070.05320.49
5.6.40.0070.03720.44
5.6.30.0000.04320.35
5.6.20.0030.04020.39
5.6.10.0100.03720.29
5.6.00.0000.04320.27
5.5.370.0130.07720.54
5.5.360.0030.08720.35
5.5.350.0070.08020.42
5.5.340.0030.04320.87
5.5.330.0030.04720.80
5.5.320.0100.04020.88
5.5.310.0070.07720.88
5.5.300.0070.07020.79
5.5.290.0130.08020.74
5.5.280.0170.07320.92
5.5.270.0030.08720.89
5.5.260.0030.09320.71
5.5.250.0100.08020.69
5.5.240.0000.04720.24
5.5.230.0030.07020.24
5.5.220.0030.07720.25
5.5.210.0100.07020.00
5.5.200.0070.03720.27
5.5.190.0030.04720.18
5.5.180.0070.04320.21
5.5.160.0030.04020.15
5.5.150.0070.05720.12
5.5.140.0070.03720.18
5.5.130.0000.04720.23
5.5.120.0030.04020.25
5.5.110.0100.04320.17
5.5.100.0030.03720.05
5.5.90.0100.03719.97
5.5.80.0030.03320.07
5.5.70.0100.03320.08
5.5.60.0030.05019.93
5.5.50.0000.03720.14
5.5.40.0000.04320.04
5.5.30.0030.06020.03
5.5.20.0030.04020.05
5.5.10.0070.03319.97
5.5.00.0030.03720.04

preferences:
32.09 ms | 400 KiB | 5 Q