3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(1, 2, 3, 4, 5); $text = array(1 => 'ONE', 2 => 'TWO', 3 => 'THREE', 4 => 'FOUR', 5 => 'FIVE'); function getNumbers() { for($j = $i; $j <=count($numbers); $j++){ yield $j; } } foreach(getNumbers() as $number){ echo $number . ':' . $text[$number] . "\n"; }

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)
8.3.60.0100.01016.63
8.3.50.0110.01017.38
8.3.40.0170.00018.89
8.3.30.0120.00918.54
8.3.20.0060.00318.77
8.3.10.0060.00320.56
8.3.00.0080.00017.63
8.2.180.0150.00316.50
8.2.170.0210.00022.96
8.2.160.0100.01022.27
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.85
8.2.110.0000.00920.94
8.2.100.0120.00017.84
8.2.90.0000.00820.71
8.2.80.0060.00317.92
8.2.70.0030.00617.50
8.2.60.0000.00817.68
8.2.50.0030.00618.07
8.2.40.0040.00418.28
8.2.30.0020.00518.06
8.2.20.0000.00717.59
8.2.10.0050.00317.80
8.2.00.0110.00017.80
8.1.280.0100.00725.92
8.1.270.0070.00024.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0050.00522.44
8.1.230.0050.00620.97
8.1.220.0000.00817.91
8.1.210.0070.00418.89
8.1.200.0060.00317.35
8.1.190.0030.00617.63
8.1.180.0040.00418.10
8.1.170.0080.00018.71
8.1.160.0040.00418.92
8.1.150.0040.00418.69
8.1.140.0050.00217.37
8.1.130.0000.00717.83
8.1.120.0000.00717.37
8.1.110.0000.00817.40
8.1.100.0000.00717.48
8.1.90.0050.00317.34
8.1.80.0000.00717.48
8.1.70.0030.00317.44
8.1.60.0040.00417.54
8.1.50.0060.00317.52
8.1.40.0020.00517.41
8.1.30.0050.00217.63
8.1.20.0000.00817.54
8.1.10.0070.00017.46
8.1.00.0070.00017.51
8.0.300.0040.00419.87
8.0.290.0030.00616.88
8.0.280.0000.00718.46
8.0.270.0050.00317.16
8.0.260.0030.00316.93
8.0.250.0040.00417.04
8.0.240.0000.00917.01
8.0.230.0000.00717.04
8.0.220.0000.00716.89
8.0.210.0030.00316.84
8.0.200.0030.00317.06
8.0.190.0040.00417.04
8.0.180.0040.00417.02
8.0.170.0000.00816.92
8.0.160.0000.00716.93
8.0.150.0080.00016.81
8.0.140.0050.00316.94
8.0.130.0030.00313.35
8.0.120.0070.00016.82
8.0.110.0040.00417.02
8.0.100.0040.00416.89
8.0.90.0000.00817.00
8.0.80.0040.01116.96
8.0.70.0080.00016.85
8.0.60.0040.00416.91
8.0.50.0000.00716.92
8.0.30.0090.00917.13
8.0.20.0110.00817.16
8.0.10.0040.00416.96
8.0.00.0130.00616.65
7.4.330.0000.00512.97
7.4.320.0000.00616.56
7.4.300.0000.00716.48
7.4.290.0000.00716.61
7.4.280.0000.00816.58
7.4.270.0030.00616.65
7.4.260.0060.00013.29
7.4.250.0040.00416.50
7.4.240.0000.00716.58
7.4.230.0060.00316.43
7.4.220.0060.01216.66
7.4.210.0070.00816.52
7.4.200.0030.00316.50
7.4.190.0050.00216.65
7.4.160.0100.01016.53
7.4.150.0120.01416.48
7.4.140.0080.01316.52
7.4.130.0130.00516.48
7.4.120.0120.00716.51
7.4.110.0100.00616.44
7.4.100.0050.01116.65
7.4.90.0150.00316.45
7.4.80.0030.01416.55
7.4.70.0100.00716.38
7.4.60.0180.00616.55
7.4.50.0070.00016.51
7.4.40.0070.00716.38
7.4.30.0100.00616.57
7.4.00.0000.01714.82
7.3.330.0000.00613.38
7.3.320.0060.00013.43
7.3.310.0070.00016.25
7.3.300.0070.00016.48
7.3.290.0130.00716.40
7.3.280.0080.00716.44
7.3.270.0120.00616.42
7.3.260.0060.00916.57
7.3.250.0120.00816.39
7.3.240.0070.01016.47
7.3.230.0140.01116.53
7.3.210.0120.00416.47
7.3.200.0150.00619.39
7.3.190.0070.01016.45
7.3.180.0130.00316.59
7.3.170.0030.01416.53
7.3.160.0050.01116.41
7.3.120.0000.01514.94
7.2.330.0090.00916.64
7.2.320.0070.01016.73
7.2.310.0180.00316.88
7.2.300.0130.00616.94
7.2.290.0100.00616.75
7.2.60.0040.01116.92
7.2.00.0070.00719.40
7.1.200.0060.00915.77
7.1.100.0060.00617.98
7.1.70.0030.00816.78
7.1.60.0100.01419.40
7.1.50.0040.00717.10
7.1.00.0070.03022.35
7.0.200.0100.00714.96
7.0.140.0030.07321.99
7.0.120.0070.07022.16
7.0.60.0100.06720.02
7.0.50.0130.06717.84
7.0.40.0100.05020.27
7.0.30.0200.04720.25
7.0.20.0330.06320.33
7.0.10.0100.07320.33
7.0.00.0030.08720.20
5.6.280.0100.06720.91
5.6.210.0100.05020.71
5.6.200.0100.08318.16
5.6.190.0100.08020.77
5.6.180.0330.07020.77
5.6.170.0230.06720.53
5.6.160.0130.08020.50
5.6.150.0070.03718.19
5.6.140.0130.04018.18
5.6.130.0030.08018.15
5.6.120.0030.04021.15
5.6.110.0200.05321.14
5.6.100.0070.08321.00
5.6.90.0100.08021.04
5.6.80.0200.07020.31
5.5.350.0300.07320.46
5.5.340.0030.08017.96
5.5.330.0130.07720.47
5.5.320.0230.07720.42
5.5.310.0300.07720.51
5.5.300.0100.07717.97
5.5.290.0170.07017.97
5.5.280.0100.05020.73
5.5.270.0100.06320.87
5.5.260.0000.09020.84
5.5.250.0030.04020.62
5.5.240.0100.07320.21
5.4.450.0030.08719.41
5.4.440.0100.07319.47
5.4.430.0000.05719.47
5.4.420.0070.04719.57
5.4.410.0170.03319.12
5.4.400.0000.04018.88
5.4.390.0030.04018.87
5.4.380.0070.04019.20
5.4.370.0070.03318.95
5.4.360.0030.04019.14
5.4.350.0030.07719.07
5.4.340.0130.03718.85
5.4.320.0030.03719.14
5.4.310.0070.03319.24
5.4.300.0000.04719.14
5.4.290.0030.04019.07
5.4.280.0030.03719.24
5.4.270.0030.03718.85
5.4.260.0070.04319.23
5.4.250.0030.03719.11
5.4.240.0030.03719.14
5.4.230.0030.04719.19
5.4.220.0000.04019.15
5.4.210.0100.03018.87
5.4.200.0100.04019.00
5.4.190.0030.03719.14
5.4.180.0100.03319.23
5.4.170.0070.03719.23
5.4.160.0070.05319.22
5.4.150.0030.05019.10
5.4.140.0070.03316.32
5.4.130.0100.03716.34
5.4.120.0000.04016.37
5.4.110.0030.06016.30
5.4.100.0030.03716.41
5.4.90.0030.06316.30
5.4.80.0130.06716.28
5.4.70.0070.05316.37
5.4.60.0100.07016.37
5.4.50.0070.03316.34
5.4.40.0030.06016.38
5.4.30.0000.04716.52
5.4.20.0130.06316.38
5.4.10.0130.06716.31
5.4.00.0070.07015.86
5.3.290.0070.03314.72
5.3.280.0070.03714.48
5.3.270.0030.04014.70
5.3.260.0030.04714.63
5.3.250.0070.03714.68
5.3.240.0100.06014.63
5.3.230.0000.04014.74
5.3.220.0070.03314.60
5.3.210.0030.04314.48
5.3.200.0030.03714.59
5.3.190.0030.05314.61
5.3.180.0000.08314.61
5.3.170.0030.08314.59
5.3.160.0100.07314.61
5.3.150.0070.04714.60
5.3.140.0070.07014.58
5.3.130.0030.07714.57
5.3.120.0000.06714.54
5.3.110.0070.07014.54
5.3.100.0030.07714.05
5.3.90.0130.07014.05
5.3.80.0030.05714.04
5.3.70.0000.04314.18
5.3.60.0070.07713.96
5.3.50.0030.05013.95
5.3.40.0070.07713.99
5.3.30.0070.05713.96
5.3.20.0030.06313.58
5.3.10.0030.04713.66
5.3.00.0030.03713.61
5.2.170.0100.03711.17
5.2.160.0000.03011.30
5.2.150.0000.03311.15
5.2.140.0000.06011.22
5.2.130.0030.06011.16
5.2.120.0100.03711.07
5.2.110.0100.02311.15
5.2.100.0100.04011.06
5.2.90.0070.03711.05
5.2.80.0100.05011.16
5.2.70.0030.03711.25
5.2.60.0100.05710.98
5.2.50.0070.04011.07
5.2.40.0030.06311.15
5.2.30.0070.03711.04
5.2.20.0070.05311.05
5.2.10.0000.03710.82
5.2.00.0170.04310.88
5.1.60.0070.0409.91
5.1.50.0100.0509.90
5.1.40.0070.0539.93
5.1.30.0070.03310.40
5.1.20.0030.04010.35
5.1.10.0030.02710.13
5.1.00.0030.02710.22
5.0.50.0070.0178.57
5.0.40.0030.0238.57
5.0.30.0000.0638.57
5.0.20.0030.0278.57
5.0.10.0030.0338.57
5.0.00.0000.0408.57
4.4.90.0000.0378.57
4.4.80.0070.0138.57
4.4.70.0000.0378.57
4.4.60.0070.0278.57
4.4.50.0070.0238.57
4.4.40.0030.0538.57
4.4.30.0000.0408.57
4.4.20.0000.0208.57
4.4.10.0000.0178.57
4.4.00.0000.0408.57
4.3.110.0030.0308.57
4.3.100.0000.0278.57
4.3.90.0000.0378.57
4.3.80.0000.0378.57
4.3.70.0000.0178.57
4.3.60.0000.0178.57
4.3.50.0070.0338.57
4.3.40.0030.0478.57
4.3.30.0000.0338.57
4.3.20.0000.0278.57
4.3.10.0000.0308.57
4.3.00.0030.0138.57

preferences:
61.25 ms | 401 KiB | 5 Q