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() { global $numbers; for($j = $numbers[0]; $j <=$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.0200.01616.75
8.3.50.0120.01021.83
8.3.40.0100.00718.59
8.3.30.0280.00319.08
8.3.20.0110.00020.16
8.3.10.0040.00923.65
8.3.00.0070.00319.26
8.2.180.0100.00718.18
8.2.170.0180.00622.96
8.2.160.0100.01020.36
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0130.00626.16
8.2.120.0150.00022.08
8.2.110.0060.00622.08
8.2.100.0070.00717.97
8.2.90.0040.00719.30
8.2.80.0070.00317.97
8.2.70.0000.01217.75
8.2.60.0000.01117.91
8.2.50.0080.00418.07
8.2.40.0090.00018.34
8.2.30.0000.00818.12
8.2.20.0050.00317.77
8.2.10.0030.00620.02
8.2.00.0080.00817.91
8.1.280.0090.00625.92
8.1.270.0070.00323.97
8.1.260.0100.00526.35
8.1.250.0100.00528.09
8.1.240.0170.00023.97
8.1.230.0120.00419.17
8.1.220.0070.00317.74
8.1.210.0000.01018.77
8.1.200.0000.00917.48
8.1.190.0030.00717.52
8.1.180.0000.01118.10
8.1.170.0030.00618.59
8.1.160.0020.00722.14
8.1.150.0030.00618.71
8.1.140.0050.00317.39
8.1.130.0060.00317.95
8.1.120.0000.00817.37
8.1.110.0060.00317.43
8.1.100.0000.01117.41
8.1.90.0070.00417.54
8.1.80.0030.00717.55
8.1.70.0000.01117.50
8.1.60.0090.00317.54
8.1.50.0040.00417.63
8.1.40.0000.01117.58
8.1.30.0040.00817.58
8.1.20.0050.00517.63
8.1.10.0050.00317.66
8.1.00.0100.00017.43
8.0.300.0000.00818.77
8.0.290.0040.00417.05
8.0.280.0060.00318.30
8.0.270.0090.00317.20
8.0.260.0060.00317.11
8.0.250.0060.00316.97
8.0.240.0000.00717.00
8.0.230.0070.00216.86
8.0.220.0000.00816.94
8.0.210.0060.00316.72
8.0.200.0000.00816.87
8.0.190.0030.00616.86
8.0.180.0030.00816.84
8.0.170.0060.00316.81
8.0.160.0050.00516.86
8.0.150.0000.01016.84
8.0.140.0080.00316.78
8.0.130.0060.00313.39
8.0.120.0060.00316.85
8.0.110.0070.00316.74
8.0.100.0050.00516.78
8.0.90.0040.00416.91
8.0.80.0220.01116.88
8.0.70.0070.00216.89
8.0.60.0040.00416.95
8.0.50.0040.00416.68
8.0.30.0350.02117.01
8.0.20.0420.01717.40
8.0.10.0030.00716.82
8.0.00.0230.01616.83
7.4.330.0110.00015.05
7.4.320.0040.00716.49
7.4.300.0070.00516.52
7.4.290.0030.00516.48
7.4.280.0040.00716.28
7.4.270.0050.00516.40
7.4.260.0000.00816.54
7.4.250.0080.00416.34
7.4.240.0080.00316.40
7.4.230.0000.00916.51
7.4.220.0120.01216.46
7.4.210.0190.01116.42
7.4.200.0050.00516.28
7.4.190.0000.00916.44
7.4.160.0290.01516.29
7.4.150.0220.01917.40
7.4.140.0300.01617.86
7.4.130.0310.01716.47
7.4.120.0350.00816.46
7.4.110.0190.03016.36
7.4.100.0360.02516.23
7.4.90.0500.02016.43
7.4.80.0390.02619.39
7.4.70.0290.03016.44
7.4.60.0150.01516.35
7.4.50.0000.00616.40
7.4.40.0070.00922.77
7.4.30.0090.02216.60
7.3.330.0100.01413.40
7.3.320.0030.01613.43
7.3.310.0060.00316.20
7.3.300.0000.00716.17
7.3.290.0220.01716.36
7.3.280.0120.01816.27
7.3.270.0150.02817.40
7.3.260.0410.01616.61
7.3.250.0510.01516.34
7.3.240.0300.01016.30
7.3.230.0990.03016.39
7.3.210.0280.02116.26
7.3.200.0220.01919.39
7.3.190.0760.02816.43
7.3.180.0190.01216.24
7.3.170.0770.02616.49
7.3.160.0390.01416.31
7.2.330.0470.01716.71
7.2.320.0340.02516.69
7.2.310.0130.02216.67
7.2.300.0420.01116.76
7.2.290.0610.02416.82
7.2.100.0840.00814.45
7.2.90.1250.01014.64
7.2.80.0860.01114.41
7.2.70.0780.01214.85
7.2.60.0920.00614.85
7.2.50.0640.01315.05
7.2.40.0890.00815.17
7.2.30.0200.00815.08
7.2.20.0560.00915.02
7.2.10.0640.00015.01
7.2.00.0470.01315.00
7.1.220.0690.00313.76
7.1.210.0620.00813.77
7.1.200.0880.01113.55
7.1.190.0720.00913.84
7.1.180.0590.00413.52
7.1.170.0220.00613.94
7.1.160.0950.00713.71
7.1.150.0750.01313.87
7.1.140.0180.01014.05
7.1.130.0180.00414.08
7.1.120.0250.01314.06
7.1.110.0610.01113.84
7.1.100.0160.00413.96
7.1.90.0350.01214.17
7.1.80.0120.01213.70
7.1.70.0830.01314.10
7.1.60.0960.00932.11
7.1.50.1080.01532.20
7.1.40.1090.01032.06
7.1.30.0520.02132.27
7.1.20.0940.01232.05
7.1.10.0960.00914.00
7.1.00.1070.00614.08
7.0.310.0760.00413.27
7.0.300.0700.00913.41
7.0.290.0610.00713.40
7.0.280.0670.00613.63
7.0.270.0140.00713.25
7.0.260.0210.01013.80
7.0.250.0670.00613.68
7.0.240.0570.01313.86
7.0.230.0270.01213.63
7.0.220.0060.01613.74
7.0.210.0790.00413.52
7.0.200.0690.00713.57
7.0.190.0890.00313.39
7.0.180.0510.00413.52
7.0.170.0750.00713.27
7.0.160.0760.01013.72
7.0.150.0160.00313.39
7.0.140.0050.01013.82
7.0.130.0680.00713.77
7.0.120.0860.00713.37
7.0.110.0400.01813.80
7.0.100.0870.00713.38
7.0.90.0900.00913.82
7.0.80.0240.00513.86
7.0.70.1380.00913.49
7.0.60.0080.01513.66
7.0.50.1010.00713.65
7.0.40.0250.01113.39
7.0.30.0980.01414.03
7.0.20.0240.00513.38
7.0.10.0140.00713.30
7.0.00.0920.01013.50
5.6.380.0160.00413.86
5.6.370.0060.00914.34
5.6.360.0120.01214.34
5.6.350.0070.01414.18
5.6.340.0120.00913.98
5.6.330.0130.00814.56
5.6.320.0150.00614.49
5.6.310.0080.01314.50
5.6.300.0190.00614.19
5.6.290.0070.01414.63
5.6.280.0110.00414.58
5.6.270.0120.01014.36
5.6.260.0080.01214.55
5.6.250.0060.01214.33
5.6.240.0090.01414.23
5.6.230.0030.01814.29
5.6.220.0110.01414.25
5.6.210.0190.00714.43
5.6.200.0120.00513.99
5.6.190.0150.00714.47
5.6.180.0150.00514.29
5.6.170.0080.01014.20
5.6.160.0040.01514.11
5.6.150.0060.01613.87
5.6.140.0180.00914.08
5.6.130.0210.00514.10
5.6.120.0160.00614.34
5.6.110.0110.01114.09
5.6.100.0140.00613.97
5.6.90.0110.01614.24
5.6.80.0070.01714.04
5.6.70.0120.00314.07
5.5.380.0040.01612.17
5.5.370.0120.00412.17
5.5.360.0070.00712.17
5.5.350.0130.00012.17
5.5.340.0100.01012.17
5.5.330.0140.00012.17
5.5.320.0000.01412.17
5.5.310.0070.00712.17
5.5.300.0030.01212.17
5.5.290.0110.00412.17
5.5.280.0000.01712.17
5.5.270.0080.01512.17
5.5.260.0230.00712.17
5.5.250.0120.00612.17
5.5.240.0110.00712.17
5.4.450.0030.00912.17
5.4.440.0120.00012.17
5.4.430.0100.00312.17
5.4.420.0060.00612.17
5.4.410.0040.00412.17
5.4.400.0000.01212.17

preferences:
32.21 ms | 401 KiB | 5 Q