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[] = hash('sha512', $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.60.0030.00516.72
7.2.00.0000.01319.28
7.1.200.0030.01215.56
7.1.100.0000.01718.16
7.1.70.0050.00316.78
7.1.60.0140.01119.52
7.1.50.0040.01516.70
7.1.00.0030.07722.43
7.0.200.0040.00416.57
7.0.100.0100.03319.94
7.0.90.0070.04019.91
7.0.80.0130.03319.91
7.0.70.0070.04319.90
7.0.60.0000.04319.98
7.0.50.0100.06020.41
7.0.40.0100.04020.09
7.0.30.0030.04320.14
7.0.20.0100.04320.05
7.0.10.0000.04720.13
7.0.01.2830.45727.86
5.6.280.0000.03321.12
5.6.250.0070.03720.59
5.6.240.0100.03720.69
5.6.230.0000.04720.63
5.6.220.0000.05320.64
5.6.210.0030.04720.55
5.6.200.0000.04721.04
5.6.190.0100.03321.10
5.6.180.0000.04321.05
5.6.170.0100.03721.09
5.6.160.0070.04321.07
5.6.150.0130.07021.02
5.6.140.0030.08721.17
5.6.130.0100.06020.95
5.6.120.0070.08321.00
5.6.110.0130.08021.06
5.6.100.0130.07021.12
5.6.90.0100.07720.99
5.6.80.0000.08320.49
5.6.70.0030.08320.51
5.6.60.0130.07320.41
5.6.50.0100.07720.55
5.6.40.0070.08020.43
5.6.30.0030.08320.46
5.6.20.0130.04720.37
5.6.10.0030.08720.37
5.6.00.0130.07020.42
5.5.380.0100.06020.50
5.5.370.0130.06020.35
5.5.360.0030.04320.36
5.5.350.0100.03720.45
5.5.340.0030.04720.88
5.5.330.0070.03720.83
5.5.320.0030.04320.77
5.5.310.0030.04720.90
5.5.300.0100.07320.86
5.5.290.0170.06320.72
5.5.280.0030.08320.84
5.5.270.0030.08320.90
5.5.260.0030.08720.72
5.5.250.0070.06320.70
5.5.240.0070.08020.09
5.5.230.0100.05720.01
5.5.220.0070.07020.12
5.5.210.0070.08320.30
5.5.200.0030.04720.14
5.5.190.0070.07720.16
5.5.180.0070.08319.99
5.5.160.0000.08020.18
5.5.150.0130.07019.98
5.5.140.0070.04320.20
5.5.130.0030.08720.17
5.5.120.0100.04720.19
5.5.110.0030.05320.14
5.5.100.0070.05720.10
5.5.90.0070.08020.04
5.5.80.0000.08020.12
5.5.70.0070.08020.07
5.5.60.0130.07020.05
5.5.50.0070.08020.14
5.5.40.0130.03720.03
5.5.30.0100.07020.07
5.5.20.0100.07720.08
5.5.10.0170.07020.10
5.5.00.0030.06720.04

preferences:
35.32 ms | 401 KiB | 5 Q