3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getLinks() : array { if (rand(1,4) === 1) return ['a', 'b', 'c']; return []; } $links = []; foreach (range(1,7) as $a) { $links = getLinks(); if (count($links)) break; } print implode("\n", $links);

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.10.0030.01315.02
7.4.00.0020.01714.91
7.3.130.0070.01114.82
7.3.120.0100.00814.86
7.3.110.0050.01514.77
7.3.100.0060.00814.79
7.3.90.0030.01014.83
7.3.80.0060.00314.68
7.3.70.0070.00814.79
7.3.60.0050.00814.75
7.3.50.0070.00814.62
7.3.40.0080.00314.60
7.3.30.0050.00614.71
7.3.20.0090.00516.66
7.3.10.0090.00316.36
7.3.00.0110.00716.46
7.2.260.0100.01015.03
7.2.250.0080.01115.15
7.2.240.0030.01115.27
7.2.230.0090.00815.11
7.2.220.0060.00915.01
7.2.210.0020.00915.13
7.2.200.0060.00615.03
7.2.190.0070.00915.00
7.2.180.0080.00515.10
7.2.170.0060.00814.98
7.2.160.0090.00614.84
7.2.150.0060.00317.02
7.2.140.0140.00016.73
7.2.130.0080.00716.70
7.2.120.0270.00715.87
7.2.110.0320.00815.92
7.2.100.0490.00816.09
7.2.90.0320.00915.94
7.2.80.0330.01016.24
7.2.70.0260.01116.06
7.2.60.0460.00416.15
7.2.50.0570.01216.22
7.2.40.0460.01016.13
7.2.30.0490.00616.16
7.2.20.0570.00915.90
7.2.10.0450.01116.03
7.2.00.0560.00716.18
7.1.330.0060.00915.78
7.1.320.0070.00715.98
7.1.310.0060.00715.75
7.1.300.0060.00815.68
7.1.290.0070.00515.75
7.1.280.0100.00515.84
7.1.270.0040.00715.80
7.1.260.0060.00715.84
7.1.250.0090.00915.60
7.1.240.0530.00714.86
7.1.230.0440.00514.89
7.1.220.0440.00414.70
7.1.210.0500.01114.59
7.1.200.0790.01114.78
7.1.190.0470.00814.58
7.1.180.0380.01114.81
7.1.170.0400.00814.71
7.1.160.0630.00914.66
7.1.150.0370.00414.60
7.1.140.0430.00614.66
7.1.130.0430.00814.68
7.1.120.0510.00714.63
7.1.110.0520.00814.77
7.1.100.0630.00314.79
7.1.90.0460.00714.63
7.1.80.0800.00714.70
7.1.70.0280.00714.73
7.1.60.0120.01414.80
7.1.50.0510.00614.71
7.1.40.0330.00514.71
7.1.30.0090.01214.52
7.1.20.0440.00914.59
7.1.10.0460.00714.62
7.1.00.0550.01014.75
7.0.330.0070.00715.26
7.0.320.0000.01315.39
7.0.310.0100.00315.45
7.0.300.0110.00315.41
7.0.290.0040.01115.22
7.0.280.0040.00415.04
7.0.270.0040.01115.37
7.0.260.0070.00715.45
7.0.250.0030.00715.39
7.0.240.0050.00515.33
7.0.230.0070.00715.13
7.0.220.0040.00815.33
7.0.210.0000.01415.46
7.0.200.0130.00315.48
7.0.190.0090.00015.19
7.0.180.0100.00715.56
7.0.170.0070.01015.42
7.0.160.0030.01015.41
7.0.150.0030.00815.46
7.0.140.0090.00415.38
7.0.130.0060.00815.45
7.0.120.0000.01015.47
7.0.110.0090.00315.43
7.0.100.0100.00715.06
7.0.90.0100.00615.40
7.0.80.0150.00015.36
7.0.70.0070.01015.31
7.0.60.0070.00715.29
7.0.50.0040.01115.44
7.0.40.0060.00613.17
7.0.30.0070.00413.45
7.0.20.0070.00713.63
7.0.10.0090.00613.07
7.0.00.0090.00013.52
5.6.400.0060.00914.21
5.6.390.0060.00314.29
5.6.380.0090.00514.20
5.6.370.0000.01114.30
5.6.360.0040.00814.38
5.6.350.0060.00814.29
5.6.340.0070.00714.24
5.6.330.0090.00313.95
5.6.320.0040.00714.07
5.6.310.0000.01314.26
5.6.300.0040.00414.18
5.6.290.0060.01214.09
5.6.280.0090.00914.07
5.6.270.0050.00513.99
5.6.260.0120.00014.28
5.6.250.0130.00014.12
5.6.240.0070.01014.21
5.6.230.0090.00614.27
5.6.220.0070.00714.07
5.6.210.0070.01014.28
5.6.200.0030.00614.21
5.6.190.0070.00714.21
5.6.180.0070.00714.27
5.6.170.0030.00914.17
5.6.160.0030.01214.44
5.6.150.0000.01714.12
5.6.140.0030.01314.13
5.6.130.0040.00814.33
5.6.120.0120.00314.10
5.6.110.0000.01014.04
5.6.100.0040.01114.22
5.6.90.0070.00313.85
5.6.80.0080.00014.08
5.6.70.0050.00313.96
5.6.60.0060.00914.21
5.6.50.0070.00714.02
5.6.40.0040.01214.31
5.6.30.0030.00714.14
5.6.20.0000.00913.87
5.6.10.0040.00814.05
5.6.00.0070.00414.02

preferences:
33.28 ms | 401 KiB | 5 Q