3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tstart = microtime(true); $numberOfRandoms = 500; $uniques = array(); do { $uniques[mt_rand(10000, 99999)] = true; } while(count(array_keys($uniques)) < $numberOfRandoms); $uniques = array_keys($uniques); $elapsed = microtime(true) - $tstart; echo $elapsed . PHP_EOL;

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.0100.00715.20
7.3.120.0060.01215.02
7.3.110.0080.01114.90
7.3.100.0000.01814.69
7.3.90.0130.00314.88
7.3.80.0090.00614.55
7.3.70.0120.00314.95
7.3.60.0070.00714.96
7.3.50.0100.00714.64
7.3.40.0100.00514.81
7.3.30.0040.01114.89
7.3.20.0030.01216.71
7.3.10.0060.00916.41
7.3.00.0060.00916.81
7.2.250.0070.01415.01
7.2.240.0040.01815.37
7.2.230.0060.01214.84
7.2.220.0060.00615.25
7.2.210.0090.00315.44
7.2.200.0130.00715.22
7.2.190.0060.00615.21
7.2.180.0160.00315.05
7.2.170.0070.01015.17
7.2.00.0090.00619.21
7.1.330.0030.01315.70
7.1.320.0070.00615.91
7.1.310.0060.01315.48
7.1.300.0000.01315.85
7.1.290.0100.01015.69
7.1.280.0070.01315.58
7.1.270.0030.01015.55
7.1.260.0070.00715.89
7.1.70.0040.00417.28
7.1.60.0120.01219.33
7.1.50.0190.01934.91
7.1.00.0070.07722.48
7.0.200.0000.00916.89
7.0.140.0100.07022.00
7.0.60.0030.04019.80
7.0.50.0030.09017.71
7.0.40.0030.08720.23
7.0.30.0330.07720.32
7.0.20.0230.08320.16
7.0.10.0000.09320.13
7.0.00.0070.05020.17
5.6.280.0070.07721.07
5.6.210.0030.04720.58
5.6.200.0000.06718.15
5.6.190.0200.07320.68
5.6.180.0130.07020.73
5.6.170.0230.04020.38
5.6.160.0170.08020.44
5.6.150.0000.07018.21
5.6.140.0070.05018.20
5.6.130.0070.06318.32
5.6.120.0070.06021.05
5.6.110.0100.06721.11
5.6.100.0070.08721.09
5.6.90.0030.10021.00
5.6.80.0130.08320.51
5.6.70.0070.09320.40
5.5.350.0100.08320.44
5.5.340.0130.06017.96
5.5.330.0130.05320.25
5.5.320.0000.06320.28
5.5.310.0300.07720.27
5.5.300.0070.09317.96
5.5.290.0100.08017.89
5.5.280.0170.08321.00
5.5.270.0130.09020.71
5.5.260.0130.08720.68
5.5.250.0070.08020.52
5.5.240.0170.04020.40
5.4.450.0170.06719.41
5.4.440.0230.06019.52
5.4.430.0370.07719.54
5.4.420.0430.06719.63
5.4.410.0230.07319.41
5.4.400.0270.06019.31
5.4.390.0330.07318.93
5.4.380.0330.06718.81
5.4.370.0400.06018.80
5.4.360.0370.07318.70
5.4.350.0400.05718.63
5.4.340.0200.07318.81
5.4.320.0040.04812.61
5.4.310.0070.04412.59
5.4.300.0090.03812.60
5.4.290.0100.05212.59
5.4.280.0080.04512.47
5.4.270.0180.06912.47
5.4.260.0150.07212.47
5.4.250.0140.05712.47
5.4.240.0080.05112.47
5.4.230.0070.04712.46
5.4.220.0100.04812.46
5.4.210.0150.05612.46
5.4.200.0060.06012.46
5.4.190.0110.04512.46
5.4.180.0080.05912.46
5.4.170.0090.07312.47
5.4.160.0130.06012.46
5.4.150.0120.05712.46
5.4.140.0080.04912.14
5.4.130.0080.05512.14
5.4.120.0090.04212.09
5.4.110.0120.05312.09
5.4.100.0110.05112.09
5.4.90.0080.05212.09
5.4.80.0110.03912.09
5.4.70.0090.05612.09
5.4.60.0080.05112.09
5.4.50.0090.04012.09
5.4.40.0060.05812.07
5.4.30.0100.04812.07
5.4.20.0070.06012.07
5.4.10.0160.06912.07
5.4.00.0160.06511.56
5.3.290.0100.04412.85
5.3.280.0370.09412.76
5.3.270.0110.06812.78
5.3.260.0080.05212.78
5.3.250.0070.04812.77
5.3.240.0070.04312.78
5.3.230.0130.05612.77
5.3.220.0100.07012.74
5.3.210.0080.04512.74
5.3.200.0070.04412.74
5.3.190.0050.04312.74
5.3.180.0090.03912.73
5.3.170.0120.03612.73
5.3.160.0050.04312.73
5.3.150.0070.04112.73
5.3.140.0080.04512.72
5.3.130.0070.05112.71
5.3.120.0070.04612.72
5.3.110.0100.05012.72
5.3.100.0110.06012.20
5.3.90.0100.06112.19
5.3.80.0050.05312.18
5.3.70.0090.04612.17
5.3.60.0110.04612.16
5.3.50.0160.05812.12
5.3.40.0100.06712.11
5.3.30.0110.07212.07
5.3.20.0110.05811.85
5.3.10.0110.05011.81
5.3.00.0150.06911.80
5.2.170.0160.0639.29
5.2.160.0060.0599.29
5.2.150.0160.0799.29
5.2.140.0110.0459.29
5.2.130.0060.0499.25
5.2.120.0140.0659.25
5.2.110.0080.0429.25
5.2.100.0070.0419.26
5.2.90.0130.0719.25
5.2.80.0120.0479.25
5.2.70.0070.0679.25
5.2.60.0090.0799.20
5.2.50.0060.0499.17
5.2.40.0060.0589.15
5.2.30.0050.0399.13
5.2.20.0080.0379.11
5.2.10.0050.0509.06
5.2.00.0090.0408.92
5.1.60.0060.0338.25
5.1.50.0040.0368.25
5.1.40.0050.0358.23
5.1.30.0060.0448.58
5.1.20.0070.0508.60
5.1.10.0080.0418.33
5.1.00.0030.0368.32
5.0.50.0050.0306.80
5.0.40.0040.0346.66
5.0.30.0040.0466.48
5.0.20.0090.0436.45
5.0.10.0050.0316.42
5.0.00.0060.0426.41
4.4.90.0060.0394.82
4.4.80.0030.0264.81
4.4.70.0040.0254.80
4.4.60.0100.0504.81
4.4.50.0070.0804.82
4.4.40.0040.0494.81
4.4.30.0030.0264.81
4.4.20.0040.0244.87
4.4.10.0030.0254.88
4.4.00.0040.0394.84
4.3.110.0020.0274.75
4.3.100.0020.0264.73
4.3.90.0070.0214.73
4.3.80.0030.0354.73
4.3.70.0060.0214.72
4.3.60.0040.0224.73
4.3.50.0050.0234.72
4.3.40.0030.0344.68
4.3.30.0020.0263.49
4.3.20.0020.0263.47
4.3.10.0010.0273.43
4.3.00.0000.0407.78

preferences:
38.47 ms | 401 KiB | 5 Q