3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (phpversion() != '7.0.0') { die; } $ids = []; for($i=0; $i<100000; $i++) { $userid = bin2hex(random_bytes(12)); $ids[] = $userid.hash('sha512', random_bytes(64)); var_dump($ids);die; } $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.0060.01217.15
7.3.110.0030.01017.15
7.3.100.0090.00617.15
7.3.90.0080.00417.15
7.3.80.0080.00617.15
7.3.70.0000.01517.15
7.3.60.0070.00417.15
7.3.50.0090.00617.15
7.3.40.0060.00617.15
7.3.30.0040.00417.15
7.3.20.0070.00717.15
7.3.10.0070.01017.15
7.3.00.0060.00617.15
7.2.240.0070.00317.15
7.2.230.0110.00417.15
7.2.220.0040.00717.15
7.2.210.0040.00817.15
7.2.200.0030.01317.15
7.2.190.0060.00617.15
7.2.180.0060.00317.15
7.2.170.0000.00917.15
7.2.160.0120.00417.15
7.2.150.0030.01017.15
7.2.140.0040.00417.15
7.2.130.0060.00917.15
7.2.120.0120.00317.15
7.2.110.0040.01117.15
7.2.100.0000.01017.15
7.2.90.0030.01117.15
7.2.80.0040.01417.15
7.2.70.0070.00717.15
7.2.60.0000.01217.04
7.2.50.0060.01217.15
7.2.40.0030.00617.15
7.2.30.0070.01017.15
7.2.20.0090.00617.15
7.2.10.0030.00717.15
7.2.00.0050.00818.07
7.1.330.0080.00417.15
7.1.320.0030.00817.15
7.1.310.0040.01117.15
7.1.300.0130.00317.15
7.1.290.0030.00917.15
7.1.280.0030.01017.15
7.1.270.0110.00417.15
7.1.260.0040.01117.15
7.1.250.0000.01417.15
7.1.200.0040.00715.61
7.1.100.0030.00918.10
7.1.70.0030.01016.78
7.1.60.0110.01419.52
7.1.50.0000.01116.86
7.1.00.0030.09722.28
7.0.200.0050.00216.41
7.0.60.4930.03720.04
7.0.50.0100.08017.90
7.0.40.0170.08020.27
7.0.30.0300.05020.02
7.0.20.0170.04320.16
7.0.10.0070.05320.16
7.0.00.0070.04020.17
5.6.280.0030.03021.14
5.6.210.0070.03720.69
5.6.200.0100.07018.21
5.6.190.0100.08020.60
5.6.180.0230.03320.60
5.6.170.0330.07020.48
5.6.160.0100.08020.48
5.6.150.0070.08318.11
5.6.140.0000.07018.12
5.6.130.0030.08718.07
5.6.120.0100.03320.99
5.6.110.0030.07320.98
5.6.100.0100.07720.88
5.6.90.0070.04020.97
5.6.80.0130.05720.51
5.5.350.4400.04020.44
5.5.340.0030.08318.02
5.5.330.0100.04720.19
5.5.320.0230.07720.33
5.5.310.0130.05320.29
5.5.300.0130.06317.90
5.5.290.0070.04017.98
5.5.280.0030.08320.76
5.5.270.0100.08020.76
5.5.260.0170.06720.79
5.5.250.0030.04020.46
5.5.240.0200.03720.11

preferences:
35.98 ms | 400 KiB | 5 Q