3v4l.org

run code in 200+ PHP versions simultaneously
<?php function randomNumberSequence($requiredLength = 7, $highestDigit = 8) { $sequence = ''; for ($i = 0; $i < $requiredLength; ++$i) { $sequence .= mt_rand(0, $highestDigit); } return $sequence; } $numberPrefixes = ['0812', '0813', '0814', '0815', '0816', '0817', '0818', '0819', '0909', '0908']; for ($i = 0; $i < 21; ++$i) { echo $numberPrefixes[array_rand($numberPrefixes)] , randomNumberSequence() , "\n"; }
based on vbUkS

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.0130.00515.95
7.4.00.0080.01216.12
7.3.130.0060.01315.95
7.3.120.0100.00916.06
7.3.110.0090.00915.98
7.3.100.0080.00916.08
7.3.90.0090.00915.93
7.3.80.0070.00815.99
7.3.70.0080.01115.93
7.3.60.0110.00715.85
7.3.50.0100.00815.76
7.3.40.0070.01015.57
7.3.30.0070.00915.71
7.3.20.0120.00616.06
7.3.10.0100.00916.08
7.3.00.0110.00716.05
7.2.260.0060.01116.11
7.2.250.0080.01116.03
7.2.240.0120.00916.02
7.2.230.0120.00616.14
7.2.220.0070.00916.06
7.2.210.0140.00616.22
7.2.200.0090.01116.19
7.2.190.0090.00816.20
7.2.180.0080.01015.95
7.2.170.0100.00715.95
7.2.160.0090.00815.91
7.2.150.0130.00816.26
7.2.140.0130.00816.34
7.2.130.0130.01116.43
7.2.120.0070.01016.27
7.2.110.0070.01116.27
7.2.100.0130.00916.33
7.2.90.0100.00816.30
7.2.80.0090.00916.27
7.2.70.0060.01016.38
7.2.60.0110.00616.28
7.2.50.0070.01116.27
7.2.40.0120.00816.40
7.2.30.0060.01116.30
7.2.20.0080.01016.29
7.2.10.0060.01016.23
7.2.00.0100.00716.39
7.1.330.0150.00714.89
7.1.320.0140.00715.07
7.1.310.0140.00615.13
7.1.300.0130.00815.14
7.1.290.0140.00915.06
7.1.280.0080.01115.17
7.1.270.0140.00515.01
7.1.260.0110.00815.33
7.1.250.0100.00815.14
7.1.240.0100.01014.99
7.1.230.0120.00815.11
7.1.220.0150.00715.16
7.1.210.0090.01214.94
7.1.200.0110.01015.10
7.1.190.0110.01015.08
7.1.180.0110.01015.06
7.1.170.0130.00815.07
7.1.160.0110.01215.05
7.1.150.0130.00715.03
7.1.140.0120.01015.10
7.1.130.0140.00815.18
7.1.120.0150.00715.24
7.1.110.0140.00815.11
7.1.100.0180.00815.12
7.1.90.0140.01115.17
7.1.80.0140.00915.12
7.1.70.0150.00915.14
7.1.60.0160.01115.14
7.1.50.0140.01115.23
7.1.40.0150.00715.13
7.1.30.0180.00615.25
7.1.20.0160.00615.17
7.1.10.0170.00415.08
7.1.00.0110.01215.13
7.0.330.0180.00314.16
7.0.320.0090.01114.42
7.0.310.0140.01014.46
7.0.300.0110.00814.35
7.0.290.0160.00814.39
7.0.280.0130.00914.33
7.0.270.0140.01014.37
7.0.260.0140.00714.27
7.0.250.0160.00814.30
7.0.240.0230.00114.42
7.0.230.0080.01214.19
7.0.220.0090.01114.25
7.0.210.0120.01114.15
7.0.200.0120.00714.46
7.0.190.0110.00814.37
7.0.180.0070.01214.30
7.0.170.0060.01114.41
7.0.160.0070.01214.24
7.0.150.0130.00714.11
7.0.140.0110.01014.39
7.0.130.0100.00914.34
7.0.120.0120.00814.32
7.0.110.0140.00814.26
7.0.100.0130.00814.41
7.0.90.0120.00814.32
7.0.80.0130.00614.34
7.0.70.0130.00814.38
7.0.60.0240.00714.30
7.0.50.0160.00514.48
7.0.40.0130.00814.42
7.0.30.0170.00714.43
7.0.20.0080.01214.35
7.0.10.0140.00914.33
7.0.00.0130.01114.33
5.6.400.0120.00914.99
5.6.390.0140.00915.18
5.6.380.0170.00515.08
5.6.370.0160.00715.04
5.6.360.0120.01015.11
5.6.350.0120.01015.22
5.6.340.0080.01314.93
5.6.330.0170.00615.00
5.6.320.0090.01215.16
5.6.310.0190.00315.02
5.6.300.0110.01214.89
5.6.290.0120.01115.19
5.6.280.0090.01215.10
5.6.270.0060.01515.27
5.6.260.0090.01515.06
5.6.250.0120.01215.22
5.6.240.0230.00614.92
5.6.230.0090.01315.10
5.6.220.0100.01114.83
5.6.210.0090.01215.04
5.6.200.0080.01414.99
5.6.190.0120.01215.12
5.6.180.0130.01114.95
5.6.170.0130.01315.01
5.6.160.0110.01214.97
5.6.150.0110.01315.13
5.6.140.0120.01215.11
5.6.130.0140.01115.08
5.6.120.0180.00915.03
5.6.110.0110.01115.11
5.6.100.0160.00815.38
5.6.90.0170.00815.10
5.6.80.0090.01315.09
5.6.70.0120.01014.93
5.6.60.0100.01415.17
5.6.50.0130.01115.10
5.6.40.0130.00915.07
5.6.30.0120.01015.10
5.6.20.0170.00715.01
5.6.10.0190.00415.16
5.6.00.0160.00814.98
5.5.380.0130.01315.05
5.5.370.0150.00815.14
5.5.360.0140.00715.05
5.5.350.0090.01215.10
5.5.340.0120.01215.19
5.5.330.0180.00714.98
5.5.320.0150.00815.16
5.5.310.0140.01115.24
5.5.300.0130.01015.12
5.5.290.0090.01414.98
5.5.280.0120.01415.15
5.5.270.0180.00815.10
5.5.260.0190.00615.11
5.5.250.0220.00615.10
5.5.240.0120.00714.90
5.5.230.0160.01014.92
5.5.220.0160.00915.08
5.5.210.0130.01014.96
5.5.200.0170.01014.91
5.5.190.0110.01115.11
5.5.180.0120.01315.06
5.5.170.0140.01115.05
5.5.160.0150.00914.95
5.5.150.0100.01115.07
5.5.140.0100.01214.73
5.5.130.0130.01014.84
5.5.120.0130.00814.97
5.5.110.0130.00814.96
5.5.100.0140.00815.08
5.5.90.0130.00815.23
5.5.80.0130.01015.02
5.5.70.0110.00914.91
5.5.60.0100.01014.98
5.5.50.0100.01015.11
5.5.40.0110.01114.90
5.5.30.0120.00914.92
5.5.20.0120.00814.93
5.5.10.0090.01315.12
5.5.00.0150.01214.93
5.4.450.0120.00812.76
5.4.440.0100.00812.67
5.4.430.0090.00912.72
5.4.420.0100.00912.78
5.4.410.0070.00912.75
5.4.400.0120.00612.77
5.4.390.0080.00812.65
5.4.380.0160.00612.72
5.4.370.0130.00512.68
5.4.360.0140.00512.76
5.4.350.0080.00912.67
5.4.340.0140.00212.68
5.4.330.0140.00412.65
5.4.320.0150.00712.78
5.4.310.0090.00712.66
5.4.300.0120.00512.76
5.4.290.0090.00512.71
5.4.280.0070.00812.67
5.4.270.0090.00612.65
5.4.260.0100.00612.65
5.4.250.0140.00712.71
5.4.240.0120.00612.71
5.4.230.0110.00412.58
5.4.220.0100.00612.61
5.4.210.0080.00812.75
5.4.200.0080.00812.72
5.4.190.0090.00712.72
5.4.180.0140.00312.73
5.4.170.0080.00912.70
5.4.160.0120.00712.62
5.4.150.0130.00412.70
5.4.140.0120.00812.71
5.4.130.0080.00912.71
5.4.120.0130.00512.72
5.4.110.0060.01012.83
5.4.100.0090.01012.67
5.4.90.0180.00512.60
5.4.80.0110.00712.79
5.4.70.0130.00512.68
5.4.60.0100.00612.72
5.4.50.0080.00812.68
5.4.40.0150.00212.76
5.4.30.0100.01112.76
5.4.20.0130.00612.77
5.4.10.0060.00912.77
5.4.00.0090.00712.62
5.3.290.0090.00612.75
5.3.280.0080.00612.71
5.3.270.0120.00212.76
5.3.260.0080.00812.73
5.3.250.0100.00612.68
5.3.240.0120.00512.67
5.3.230.0090.00712.73
5.3.220.0130.00312.70
5.3.210.0110.00512.80
5.3.200.0080.00812.69
5.3.190.0060.01012.73
5.3.180.0100.00712.74
5.3.170.0090.00712.82
5.3.160.0110.00612.78
5.3.150.0140.00112.77
5.3.140.0090.00812.70
5.3.130.0070.00912.77
5.3.120.0050.01012.75
5.3.110.0110.00512.74
5.3.100.0060.01012.86
5.3.90.0090.00812.84
5.3.80.0080.00612.73
5.3.70.0080.00712.83
5.3.60.0080.00712.83
5.3.50.0060.00912.68
5.3.40.0080.00612.73
5.3.30.0050.01212.73
5.3.20.0100.00312.68
5.3.10.0070.00812.62
5.3.00.0060.01112.59
5.2.170.0100.00312.27
5.2.160.0080.00512.27
5.2.150.0070.00712.27
5.2.140.0040.01112.28
5.2.130.0080.00512.27
5.2.120.0070.00612.27
5.2.110.0090.00412.27
5.2.100.0100.00512.27
5.2.90.0060.01012.34
5.2.80.0080.00612.27
5.2.70.0120.00512.27
5.2.60.0080.00512.27
5.2.50.0130.00012.27
5.2.40.0100.00812.27
5.2.30.0050.01012.27
5.2.20.0040.01012.27
5.2.10.0080.00512.27
5.2.00.0140.00112.27
5.1.60.0040.00812.27
5.1.50.0090.00412.27
5.1.40.0080.00312.27
5.1.30.0020.01212.27
5.1.20.0050.00812.27
5.1.10.0080.00312.27
5.1.00.0100.00212.27
5.0.50.0050.00512.27
5.0.40.0080.00312.27
5.0.30.0070.00412.27
5.0.20.0070.00312.27
5.0.10.0050.00412.27
5.0.00.0020.00712.27
4.4.90.0020.00512.27
4.4.80.0040.00312.27
4.4.70.0030.00412.27
4.4.60.0050.00212.27
4.4.50.0030.00512.27
4.4.40.0040.00212.27
4.4.30.0050.00212.27
4.4.20.0060.00212.27
4.4.10.0050.00212.27
4.4.00.0040.00312.27
4.3.110.0060.00112.27
4.3.100.0020.00512.27
4.3.90.0030.00312.27
4.3.80.0030.00312.27
4.3.70.0060.00212.27
4.3.60.0050.00112.27
4.3.50.0050.00212.27
4.3.40.0040.00312.27
4.3.30.0030.00312.27
4.3.20.0060.00012.27
4.3.10.0040.00312.27
4.3.00.0010.00512.27