3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generate_ints($n){ foreach ( range(0,$n-1) as $number) { yield $number; } } $gen = generate_ints(10); // iterable object can be used in foreach foreach ($gen as $g) { echo $gen->current(); $gen->next(); }

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.0070.01318.56
8.3.50.0110.00921.08
8.3.40.0070.00718.84
8.3.30.0070.00720.25
8.3.20.0030.00618.57
8.3.10.0040.00421.10
8.3.00.0000.00723.60
8.2.180.0040.01116.38
8.2.170.0140.00022.96
8.2.160.0130.00320.37
8.2.150.0030.00524.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00020.77
8.2.110.0000.00919.30
8.2.100.0080.00317.84
8.2.90.0050.00319.27
8.2.80.0000.00918.04
8.2.70.0040.00717.63
8.2.60.0030.00617.93
8.2.50.0030.00518.07
8.2.40.0070.00218.21
8.2.30.0040.00419.48
8.2.20.0050.00317.59
8.2.10.0000.00917.56
8.2.00.0000.00817.54
8.1.280.0130.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00320.76
8.1.230.0060.00620.91
8.1.220.0040.00418.77
8.1.210.0030.00619.04
8.1.200.0060.00617.48
8.1.190.0000.00717.53
8.1.180.0050.00318.10
8.1.170.0030.00618.65
8.1.160.0000.00818.88
8.1.150.0070.00418.63
8.1.140.0000.00817.40
8.1.130.0000.00717.81
8.1.120.0040.00417.37
8.1.110.0040.00417.43
8.1.100.0070.00017.46
8.1.90.0040.00417.36
8.1.80.0040.00417.33
8.1.70.0000.00717.40
8.1.60.0030.00517.47
8.1.50.0050.00317.46
8.1.40.0000.00917.50
8.1.30.0050.00217.63
8.1.20.0030.00517.56
8.1.10.0000.00717.52
8.1.00.0000.00717.42
8.0.300.0040.00419.71
8.0.290.0000.00717.05
8.0.280.0000.00818.44
8.0.270.0070.00017.25
8.0.260.0000.00716.76
8.0.250.0050.00216.95
8.0.240.0000.00716.98
8.0.230.0000.00716.88
8.0.220.0070.00016.76
8.0.210.0080.00016.86
8.0.200.0030.00316.92
8.0.190.0000.00716.82
8.0.180.0000.00716.91
8.0.170.0050.00316.90
8.0.160.0040.00316.74
8.0.150.0080.00016.86
8.0.140.0000.00816.74
8.0.130.0000.00613.30
8.0.120.0000.00716.85
8.0.110.0080.00016.77
8.0.100.0000.00716.86
8.0.90.0040.00416.91
8.0.80.0090.00616.86
8.0.70.0000.00716.84
8.0.60.0050.00216.92
8.0.50.0040.00316.94
8.0.30.0120.00717.08
8.0.20.0170.01217.40
8.0.10.0050.00316.89
8.0.00.0080.01116.72
7.4.330.0050.00016.78
7.4.320.0090.00016.58
7.4.300.0000.00716.44
7.4.290.0040.00416.56
7.4.280.0000.00716.49
7.4.270.0030.00316.64
7.4.260.0000.00513.25
7.4.250.0050.00316.54
7.4.240.0040.00416.51
7.4.230.0040.00416.33
7.4.220.0130.01416.61
7.4.210.0060.00916.57
7.4.200.0040.00416.48
7.4.190.0030.00316.53
7.4.160.0090.00616.33
7.4.150.0120.01217.40
7.4.140.0100.00817.86
7.4.130.0090.01016.52
7.4.120.0050.01216.54
7.4.110.0080.00816.69
7.4.100.0120.00416.39
7.4.90.0130.00716.48
7.4.80.0120.01019.39
7.4.70.0130.00316.55
7.4.60.0080.00816.31
7.4.50.0000.00716.62
7.4.40.0050.01022.77
7.4.30.0070.01316.59
7.4.00.0100.00715.00
7.3.330.0030.00313.16
7.3.320.0000.00513.37
7.3.310.0030.00316.36
7.3.300.0070.00016.40
7.3.290.0070.01016.36
7.3.280.0090.00716.38
7.3.270.0160.00017.40
7.3.260.0120.00818.24
7.3.250.0200.01116.40
7.3.240.0110.00616.63
7.3.230.0100.00716.57
7.3.210.0150.00316.48
7.3.200.0080.01119.39
7.3.190.0090.01216.36
7.3.180.0090.00616.44
7.3.170.0060.00916.43
7.3.160.0080.00816.34
7.3.120.0040.01214.96
7.3.00.0070.00716.29
7.2.330.0070.01116.74
7.2.320.0090.00916.79
7.2.310.0060.01616.61
7.2.300.0070.01316.73
7.2.290.0060.00916.52
7.2.130.0070.00316.98
7.2.120.0070.00716.97
7.2.110.0030.00716.79
7.2.100.0000.01016.67
7.2.90.0120.00016.81
7.2.80.0040.01116.97
7.2.70.0000.01416.71
7.2.60.0080.00316.79
7.2.50.0100.00016.96
7.2.40.0030.00916.79
7.2.30.0080.00416.66
7.2.20.0030.01017.02
7.2.10.0100.00617.10
7.2.00.0030.00917.03
7.1.250.0060.00615.54
7.1.240.0040.00815.67
7.1.230.0100.00315.89
7.1.220.0000.01315.81
7.1.210.0130.00315.71
7.1.200.0130.00315.60
7.1.190.0000.01215.78
7.1.180.0030.00915.95
7.1.170.0030.00915.76
7.1.160.0090.00615.91
7.1.150.0060.00615.93
7.1.140.0080.00415.76
7.1.130.0070.00715.56
7.1.120.0000.01415.73
7.1.110.0070.00715.49
7.1.100.0000.01315.79
7.1.90.0080.00515.80
7.1.80.0070.00715.55
7.1.70.0010.00616.57
7.1.60.0150.00217.53
7.1.50.0090.00316.37
7.1.40.0080.00615.83
7.1.30.0040.00815.50
7.1.20.0100.00315.76
7.1.10.0080.00415.62
7.1.00.0070.02119.13
7.0.330.0000.01015.40
7.0.320.0040.01115.37
7.0.310.0060.00915.27
7.0.300.0000.01315.22
7.0.290.0110.00315.45
7.0.280.0040.00815.44
7.0.270.0040.00815.51
7.0.260.0030.01015.41
7.0.250.0030.01015.45
7.0.240.0030.01015.46
7.0.230.0070.00415.54
7.0.220.0070.00715.46
7.0.210.0100.00015.36
7.0.200.0030.00715.96
7.0.190.0060.00615.11
7.0.180.0040.00715.29
7.0.170.0000.01115.45
7.0.160.0040.00415.49
7.0.150.0030.00615.37
7.0.140.0070.04018.80
7.0.130.0070.00715.43
7.0.120.0040.00815.45
7.0.110.0030.01015.50
7.0.100.0030.02517.69
7.0.90.0030.02017.74
7.0.80.0080.02517.76
7.0.70.0080.04617.75
7.0.60.0130.04717.64
7.0.50.0080.02717.91
7.0.40.0020.04316.68
7.0.30.0050.02816.84
7.0.20.0070.02916.74
7.0.10.0050.02716.90
7.0.00.0070.02416.75
5.6.380.0040.00814.57
5.6.370.0030.00713.95
5.6.360.0090.00014.68
5.6.350.0110.00414.60
5.6.340.0000.01314.65
5.6.330.0030.00914.49
5.6.320.0030.01014.59
5.6.310.0060.00614.36
5.6.300.0060.00314.43
5.6.290.0070.00714.46
5.6.280.0050.03917.68
5.6.270.0070.01114.42
5.6.260.0070.00714.32
5.6.250.0050.02217.41
5.6.240.0020.02217.41
5.6.230.0080.01817.45
5.6.220.0050.03517.60
5.6.210.0030.02217.38
5.6.200.0010.02517.65
5.6.190.0030.02617.70
5.6.180.0020.02517.64
5.6.170.0020.03917.74
5.6.160.0090.01817.72
5.6.150.0060.02317.87
5.6.140.0050.02317.72
5.6.130.0020.04317.64
5.6.120.0070.02317.61
5.6.110.0090.03817.62
5.6.100.0100.03717.64
5.6.90.0050.04017.64
5.6.80.0030.04217.36
5.6.70.0060.04117.52
5.6.60.0050.02317.21
5.6.50.0070.04217.43
5.6.40.0050.03717.30
5.6.30.0070.04417.37
5.6.20.0000.03617.14
5.6.10.0120.03417.28
5.6.00.0050.02317.34
5.5.380.0030.02315.81
5.5.370.0000.02415.81
5.5.360.0050.02115.90
5.5.350.0050.03715.95
5.5.340.0100.04215.99
5.5.330.0060.02316.11
5.5.320.0030.03815.98
5.5.310.0070.03816.02
5.5.300.0050.04316.06
5.5.290.0110.03516.01
5.5.280.0020.03716.04
5.5.270.0050.04616.03
5.5.260.0090.02016.03
5.5.250.0090.04015.98
5.5.240.0040.04015.75
5.5.230.0060.04415.68
5.5.220.0080.02815.72
5.5.210.0070.04515.68
5.5.200.0090.03415.70
5.5.190.0090.03315.76
5.5.180.0030.02515.68
5.5.170.0040.00411.18
5.5.160.0060.03715.72
5.5.150.0050.02015.72
5.5.140.0020.02215.74
5.5.130.0030.02415.63
5.5.120.0080.03615.72
5.5.110.0080.04015.78
5.5.100.0070.03115.61
5.5.90.0030.02215.66
5.5.80.0040.03315.64
5.5.70.0030.03815.70
5.5.60.0070.03915.73
5.5.50.0030.02115.68
5.5.40.0030.02115.67
5.5.30.0030.02015.63
5.5.20.0050.04115.68
5.5.10.0070.04315.70
5.5.00.0070.03515.62
5.4.450.0020.02615.32
5.4.440.0070.03015.37
5.4.430.0010.04615.31
5.4.420.0050.04215.34
5.4.410.0000.04315.20
5.4.400.0030.02715.11
5.4.390.0030.03515.13
5.4.380.0030.03615.16
5.4.370.0030.04215.02
5.4.360.0050.04515.06
5.4.350.0030.03015.04
5.4.340.0060.02115.16
5.4.330.0000.00811.18
5.4.320.0050.02415.17
5.4.310.0100.03515.03
5.4.300.0010.05115.02
5.4.290.0070.02515.10
5.4.280.0030.04015.16
5.4.270.0030.02315.16
5.4.260.0080.01715.21
5.4.250.0100.01515.17
5.4.240.0030.02515.19
5.4.230.0020.04015.21
5.4.220.0030.02715.13
5.4.210.0040.03115.02
5.4.200.0030.04215.04
5.4.190.0030.02615.15
5.4.180.0000.02515.06
5.4.170.0020.02815.02
5.4.160.0020.04315.10
5.4.150.0070.04015.19
5.4.140.0030.03813.80
5.4.130.0040.02013.83
5.4.120.0080.03313.83
5.4.110.0030.03813.83
5.4.100.0050.04313.76
5.4.90.0120.02313.78
5.4.80.0060.02213.79
5.4.70.0020.02313.75
5.4.60.0050.03313.81
5.4.50.0050.02513.71
5.4.40.0070.03713.80
5.4.30.0050.03513.81
5.4.20.0070.03513.83
5.4.10.0030.04313.74
5.4.00.0070.03413.51
5.3.290.0060.01912.89
5.3.280.0000.02312.92
5.3.270.0070.02812.90
5.3.260.0070.03612.92
5.3.250.0030.03812.92
5.3.240.0020.02412.95
5.3.230.0070.04012.93
5.3.220.0060.02112.89
5.3.210.0030.04312.92
5.3.200.0060.04012.93
5.3.190.0070.02112.93
5.3.180.0060.04512.94
5.3.170.0060.03512.90
5.3.160.0030.03812.90
5.3.150.0090.02812.87
5.3.140.0070.01712.92
5.3.130.0080.04112.92
5.3.120.0080.03212.85
5.3.110.0080.03512.91
5.3.100.0030.02512.57
5.3.90.0080.03612.63
5.3.80.0030.04112.63
5.3.70.0040.04212.59
5.3.60.0030.04112.56
5.3.50.0030.04112.63
5.3.40.0070.02412.62
5.3.30.0030.02512.55
5.3.20.0030.02512.50
5.3.10.0050.03212.44
5.3.00.0070.02312.36
5.2.170.0060.02211.67
5.2.160.0070.02811.67
5.2.150.0040.02911.67
5.2.140.0060.02311.67
5.2.130.0000.02111.67
5.2.120.0020.02911.67
5.2.110.0050.02511.67
5.2.100.0030.02311.67
5.2.90.0040.03111.67
5.2.80.0020.03111.67
5.2.70.0040.03111.67
5.2.60.0030.02211.67
5.2.50.0070.03211.67
5.2.40.0030.03311.67
5.2.30.0040.01711.67
5.2.20.0080.02511.67
5.2.10.0040.02911.67
5.2.00.0020.03411.67
5.1.60.0050.01311.67
5.1.50.0040.02711.67
5.1.40.0020.01611.67
5.1.30.0070.02211.67
5.1.20.0040.02911.67
5.1.10.0020.03011.67
5.1.00.0070.02511.67
5.0.50.0060.02311.67
5.0.40.0050.01811.67
5.0.30.0010.02011.67
5.0.20.0020.01211.67
5.0.10.0050.01611.67
5.0.00.0020.01911.67
4.4.90.0000.01311.67
4.4.80.0030.01711.67
4.4.70.0020.01111.67
4.4.60.0050.01911.67
4.4.50.0020.01811.67
4.4.40.0000.02511.67
4.4.30.0020.02111.67
4.4.20.0000.01311.67
4.4.10.0030.01511.67
4.4.00.0020.01511.67
4.3.110.0040.01211.67
4.3.100.0000.02211.67
4.3.90.0030.01811.67
4.3.80.0030.02211.67
4.3.70.0030.01711.67
4.3.60.0000.01311.67
4.3.50.0010.01011.67
4.3.40.0010.02111.67
4.3.30.0030.00711.67
4.3.20.0020.02011.67
4.3.10.0020.01311.67
4.3.00.0030.01711.67

preferences:
36.9 ms | 401 KiB | 5 Q