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($i) { for($j = $i; $j <=count($numbers); $j++){ yield $j; } } foreach($numbers 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.40.0040.01118.75
8.3.30.0090.00618.82
8.3.20.0080.00018.73
8.3.10.0050.00321.17
8.3.00.0080.00023.66
8.2.170.0080.00822.96
8.2.160.0150.00020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.18
8.2.110.0030.00620.32
8.2.100.0040.00717.84
8.2.90.0040.00419.21
8.2.80.0070.00019.41
8.2.70.0050.00317.50
8.2.60.0050.00317.93
8.2.50.0060.00618.07
8.2.40.0040.00418.16
8.2.30.0070.00021.22
8.2.20.0030.00517.72
8.2.10.0000.00817.60
8.2.00.0030.00617.68
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00022.66
8.1.230.0090.00321.04
8.1.220.0040.00418.77
8.1.210.0080.00018.85
8.1.200.0080.00317.25
8.1.190.0020.00517.53
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0000.00918.94
8.1.150.0080.00018.71
8.1.140.0030.00617.36
8.1.130.0000.00717.84
8.1.120.0040.00717.45
8.1.110.0040.00417.42
8.1.100.0000.00817.51
8.1.90.0070.00017.45
8.1.80.0000.00717.48
8.1.70.0000.00817.41
8.1.60.0090.00017.62
8.1.50.0040.00417.46
8.1.40.0040.00417.50
8.1.30.0040.00417.58
8.1.20.0000.00817.66
8.1.10.0060.00317.53
8.1.00.0080.00317.48
8.0.300.0060.00319.98
8.0.290.0070.00017.18
8.0.280.0070.00018.45
8.0.270.0030.00317.16
8.0.260.0060.00016.86
8.0.250.0040.00417.00
8.0.240.0040.00416.96
8.0.230.0030.00316.94
8.0.220.0000.00916.94
8.0.210.0000.00916.76
8.0.200.0000.00716.98
8.0.190.0040.00416.86
8.0.180.0040.00416.78
8.0.170.0030.00316.91
8.0.160.0070.00016.89
8.0.150.0030.00316.86
8.0.140.0000.01016.86
8.0.130.0000.00513.25
8.0.120.0040.00416.87
8.0.110.0000.00716.76
8.0.100.0080.00016.76
8.0.90.0020.00516.71
8.0.80.0090.01016.88
8.0.70.0060.00316.88
8.0.60.0030.00516.93
8.0.50.0040.00416.77
8.0.30.0150.00716.93
8.0.20.0110.00717.40
8.0.10.0050.00316.89
8.0.00.0080.01116.67
7.4.330.0000.00516.79
7.4.320.0050.00216.58
7.4.300.0040.00416.60
7.4.290.0040.00416.53
7.4.280.0000.00716.52
7.4.270.0040.00416.59
7.4.260.0000.00613.24
7.4.250.0030.00616.52
7.4.240.0000.00716.50
7.4.230.0050.00316.70
7.4.220.0130.01016.31
7.4.210.0080.00716.58
7.4.200.0030.00316.63
7.4.190.0000.00716.70
7.4.160.0060.00916.35
7.4.150.0070.01017.40
7.4.140.0070.00917.86
7.4.130.0120.00516.47
7.4.120.0100.00716.44
7.4.110.0130.00316.37
7.4.100.0180.00016.57
7.4.90.0060.01216.57
7.4.80.0090.00619.39
7.4.70.0100.00716.44
7.4.60.0100.00716.48
7.4.50.0000.00816.63
7.4.40.0000.01322.77
7.4.30.0060.01016.65
7.4.10.0030.01215.00
7.4.00.0020.01014.72
7.3.330.0000.00513.33
7.3.320.0020.00213.11
7.3.310.0030.00316.41
7.3.300.0000.00816.16
7.3.290.0090.01216.32
7.3.280.0070.00816.36
7.3.270.0140.00317.40
7.3.260.0110.00918.24
7.3.250.0080.01116.44
7.3.240.0040.01216.32
7.3.230.0180.00916.44
7.3.210.0060.01016.48
7.3.200.0080.01119.39
7.3.190.0170.01716.35
7.3.180.0130.00316.38
7.3.170.0110.00616.41
7.3.160.0090.00616.53
7.3.130.0000.01514.94
7.3.120.0110.00614.82
7.3.110.0030.01514.90
7.3.100.0070.00714.70
7.3.90.0080.01114.97
7.3.80.0070.00314.80
7.3.70.0070.00714.88
7.3.60.0000.00815.04
7.3.50.0100.00714.54
7.3.40.0060.00614.96
7.3.30.0030.00814.91
7.3.20.0040.00716.82
7.3.10.0030.00916.60
7.3.00.0090.00616.71
7.2.330.0140.00716.79
7.2.320.0120.00616.82
7.2.310.0030.01416.64
7.2.300.0070.01416.46
7.2.290.0140.00916.69
7.2.260.0080.00814.96
7.2.250.0060.01314.97
7.2.240.0070.00715.16
7.2.230.0060.00915.14
7.2.220.0090.00914.97
7.2.210.0060.00615.15
7.2.200.0050.00415.12
7.2.190.0040.00714.97
7.2.180.0030.01015.04
7.2.170.0090.00015.20
7.2.160.0000.01415.12
7.2.150.0040.01216.82
7.2.140.0080.00816.96
7.2.130.0020.01116.99
7.2.120.0020.00916.78
7.2.110.0040.01016.93
7.2.100.0030.01017.00
7.2.90.0080.00816.73
7.2.80.0060.00916.87
7.2.70.0080.00816.86
7.2.60.0060.00917.09
7.2.50.0060.00816.85
7.2.40.0050.00917.11
7.2.30.0070.00416.95
7.2.20.0040.00816.76
7.2.10.0060.00716.94
7.2.00.0070.00517.51
7.1.330.0130.00315.68
7.1.320.0060.00315.88
7.1.310.0000.00815.92
7.1.300.0070.01015.44
7.1.290.0000.01015.70
7.1.280.0090.00315.84
7.1.270.0000.01515.67
7.1.260.0070.00715.85
7.1.250.0060.00415.74
7.1.240.0030.00615.74
7.1.230.0040.00815.60
7.1.220.0040.01115.90
7.1.210.0070.01015.71
7.1.200.0060.00615.86
7.1.190.0040.01415.91
7.1.180.0090.00615.41
7.1.170.0070.01015.73
7.1.160.0060.00615.88
7.1.150.0060.01015.76
7.1.140.0070.00715.69
7.1.130.0000.00815.77
7.1.120.0030.01015.80
7.1.110.0040.01415.73
7.1.100.0100.00716.86
7.1.90.0100.00915.89
7.1.80.0070.00715.57
7.1.70.0070.00416.49
7.1.60.0100.00917.38
7.1.50.0070.01116.20
7.1.40.0040.00415.89
7.1.30.0000.01315.84
7.1.20.0090.00615.51
7.1.10.0090.00315.59
7.1.00.0080.03119.10
7.0.330.0030.01015.24
7.0.320.0060.00615.33
7.0.310.0030.01015.14
7.0.300.0080.00415.52
7.0.290.0000.01415.46
7.0.280.0040.01115.40
7.0.270.0070.00715.16
7.0.260.0070.00715.14
7.0.250.0050.00815.17
7.0.240.0030.01015.23
7.0.230.0030.01415.47
7.0.220.0060.00615.57
7.0.210.0090.00615.54
7.0.200.0020.00916.20
7.0.190.0080.00815.52
7.0.180.0060.00315.30
7.0.170.0000.00815.48
7.0.160.0120.00315.44
7.0.150.0060.00615.22
7.0.140.0060.03318.75
7.0.130.0070.01115.45
7.0.120.0090.00015.30
7.0.110.0070.00315.56
7.0.100.0080.00615.44
7.0.90.0070.00415.50
7.0.80.0060.00615.33
7.0.70.0060.02918.56
7.0.60.0020.03618.65
7.0.50.0080.04018.79
7.0.40.0030.02316.80
7.0.30.0020.03416.73
7.0.20.0080.02516.65
7.0.10.0020.04816.83
7.0.00.0000.05416.67
5.6.400.0030.01314.35
5.6.390.0030.01014.48
5.6.380.0070.01314.30
5.6.370.0030.00614.67
5.6.360.0030.00914.20
5.6.350.0090.00014.68
5.6.340.0030.01314.29
5.6.330.0080.00614.61
5.6.320.0100.00714.45
5.6.310.0060.00914.27
5.6.300.0060.00614.20
5.6.290.0070.00314.73
5.6.280.0050.04017.70
5.6.270.0030.01014.31
5.6.260.0120.00414.52
5.6.250.0040.00714.51
5.6.240.0000.01014.17
5.6.230.0080.00314.49
5.6.220.0120.03517.52
5.6.210.0050.04317.39
5.6.200.0080.04017.68
5.6.190.0050.02517.71
5.6.180.0030.04517.76
5.6.170.0060.03017.79
5.6.160.0040.03917.54
5.6.150.0030.03317.63
5.6.140.0090.04217.52
5.6.130.0010.05117.65
5.6.120.0050.02817.68
5.6.110.0030.05217.74
5.6.100.0080.02817.70
5.6.90.0080.04117.74
5.6.80.0080.04017.27
5.6.70.0050.03517.25
5.6.60.0040.04717.28
5.6.50.0030.04517.39
5.6.40.0060.02817.35
5.6.30.0060.02517.29
5.6.20.0020.03017.19
5.6.10.0020.02917.24
5.6.00.0020.04317.31
5.5.380.0090.00013.97
5.5.370.0100.00314.08
5.5.360.0050.03717.35
5.5.350.0030.04117.47
5.5.340.0030.02317.55
5.5.330.0070.03317.45
5.5.320.0080.02317.73
5.5.310.0110.03917.51
5.5.300.0080.03817.47
5.5.290.0090.02717.64
5.5.280.0070.04217.18
5.5.270.0070.03017.33
5.5.260.0050.02517.32
5.5.250.0060.04117.47
5.5.240.0050.02717.16
5.5.230.0020.02817.18
5.5.220.0060.04017.22
5.5.210.0040.04617.24
5.5.200.0050.03917.18
5.5.190.0050.03117.09
5.5.180.0100.02517.01
5.5.170.0040.00913.86
5.5.160.0100.03717.25
5.5.150.0070.04017.04
5.5.140.0050.04517.21
5.5.130.0040.02317.17
5.5.120.0020.02917.30
5.5.110.0080.02017.12
5.5.100.0030.02317.23
5.5.90.0030.02217.19
5.5.80.0060.02017.27
5.5.70.0040.02417.14
5.5.60.0050.02017.13
5.5.50.0020.02517.07
5.5.40.0000.02717.14
5.5.30.0020.02417.12
5.5.20.0060.02117.00
5.5.10.0030.02017.08
5.5.00.0050.02217.09
5.4.450.0050.04516.09
5.4.440.0140.03916.10
5.4.430.0020.02416.06
5.4.420.0080.02716.12
5.4.410.0020.02915.90
5.4.400.0060.04015.95
5.4.390.0050.04215.92
5.4.380.0020.02715.95
5.4.370.0050.02915.92
5.4.360.0050.03215.97
5.4.350.0040.04415.82
5.4.340.0010.02415.88
5.4.330.0030.00312.73
5.4.320.0080.04015.93
5.4.310.0050.03815.87
5.4.300.0030.02215.95
5.4.290.0020.02515.92
5.4.280.0000.02515.81
5.4.270.0030.02015.96
5.4.260.0020.02615.88
5.4.250.0020.02215.88
5.4.240.0070.01815.79
5.4.230.0080.01815.94
5.4.220.0020.02415.92
5.4.210.0070.01715.80
5.4.200.0040.01915.95
5.4.190.0040.01915.87
5.4.180.0000.02615.88
5.4.170.0040.01915.87
5.4.160.0010.03015.80
5.4.150.0080.02215.95
5.4.140.0080.01314.46
5.4.130.0050.01814.58
5.4.120.0050.01614.57
5.4.110.0030.02714.60
5.4.100.0060.01814.53
5.4.90.0050.01514.56
5.4.80.0050.02014.52
5.4.70.0030.02014.53
5.4.60.0050.02014.56
5.4.50.0020.02214.59
5.4.40.0020.02214.62
5.4.30.0040.01614.58
5.4.20.0060.01714.59
5.4.10.0020.02014.53
5.4.00.0000.02014.32
5.3.290.0070.03313.68
5.3.280.0030.02013.67
5.3.270.0020.02213.70
5.3.260.0020.04213.67
5.3.250.0030.01913.65
5.3.240.0010.02313.70
5.3.230.0020.02213.67
5.3.220.0000.01813.62
5.3.210.0000.02313.61
5.3.200.0000.03013.64
5.3.190.0020.02013.63
5.3.180.0000.02913.69
5.3.170.0030.01713.64
5.3.160.0050.02213.62
5.3.150.0030.02013.65
5.3.140.0000.02313.71
5.3.130.0020.02413.72
5.3.120.0070.01713.63
5.3.110.0070.01813.71
5.3.100.0030.02213.37
5.3.90.0050.01813.43
5.3.80.0010.02613.43
5.3.70.0000.02613.37
5.3.60.0000.03113.40
5.3.50.0020.02013.29
5.3.40.0050.01813.29
5.3.30.0020.01813.37
5.3.20.0000.02213.26
5.3.10.0000.02113.24
5.3.00.0020.02013.25
5.2.170.0000.03012.36
5.2.160.0000.02712.36
5.2.150.0000.03312.36
5.2.140.0000.06712.36
5.2.130.0000.02712.36
5.2.120.0030.02312.36
5.2.110.0000.02712.36
5.2.100.0030.02712.36
5.2.90.0000.02712.36
5.2.80.0000.03012.36
5.2.70.0000.03012.36
5.2.60.0000.02312.36
5.2.50.0070.04012.36
5.2.40.0070.03312.36
5.2.30.0030.06012.36
5.2.20.0070.05012.36
5.2.10.0030.03712.36
5.2.00.0000.04712.36
5.1.60.0000.05012.36
5.1.50.0000.02712.36
5.1.40.0030.02012.36
5.1.30.0000.05012.36
5.1.20.0000.06012.36
5.1.10.0030.05712.36
5.1.00.0000.05712.36
5.0.50.0030.03712.36
5.0.40.0000.04312.36
5.0.30.0030.06312.36
5.0.20.0000.04312.36
5.0.10.0000.04312.36
5.0.00.0000.03712.36
4.4.90.0000.01712.36
4.4.80.0000.01712.36
4.4.70.0030.01312.36
4.4.60.0000.03312.36
4.4.50.0000.02712.36
4.4.40.0030.03312.36
4.4.30.0030.01312.36
4.4.20.0000.02312.36
4.4.10.0030.03312.36
4.4.00.0000.03712.36
4.3.110.0000.03012.36
4.3.100.0000.01312.36
4.3.90.0030.03312.36
4.3.80.0000.02712.36
4.3.70.0000.03312.36
4.3.60.0000.01312.36
4.3.50.0070.01012.36
4.3.40.0030.05012.36
4.3.30.0030.03712.36
4.3.20.0000.01712.36
4.3.10.0030.01312.36
4.3.00.0030.01312.36

preferences:
50.01 ms | 400 KiB | 5 Q