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(); echo '<span style="color:blue">',$gen->next(),'<span>'; // even numbered output }

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.70.0140.00418.31
8.3.60.0140.00318.43
8.3.50.0120.00521.21
8.3.40.0110.00418.70
8.3.30.0100.00720.39
8.3.20.0050.00320.36
8.3.10.0040.00420.92
8.3.00.0080.00023.65
8.2.180.0170.00316.50
8.2.170.0140.00322.96
8.2.160.0140.00720.27
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0070.00021.10
8.2.110.0080.00319.21
8.2.100.0070.00318.03
8.2.90.0030.00519.09
8.2.80.0000.00817.97
8.2.70.0040.00417.38
8.2.60.0030.00618.04
8.2.50.0030.00518.10
8.2.40.0000.00720.40
8.2.30.0040.00419.36
8.2.20.0050.00217.66
8.2.10.0050.00317.76
8.2.00.0070.00017.82
8.1.280.0070.01025.92
8.1.270.0070.00023.99
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00322.48
8.1.230.0100.00020.30
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00717.13
8.1.180.0000.00818.10
8.1.170.0000.00818.64
8.1.160.0000.00722.05
8.1.150.0040.00418.61
8.1.140.0000.00717.39
8.1.130.0030.00317.84
8.1.120.0030.00417.36
8.1.110.0040.00417.46
8.1.100.0050.00217.36
8.1.90.0000.00717.35
8.1.80.0030.00617.43
8.1.70.0000.00717.44
8.1.60.0070.00317.65
8.1.50.0000.00817.46
8.1.40.0040.00417.46
8.1.30.0000.00817.66
8.1.20.0000.00917.63
8.1.10.0070.00017.42
8.1.00.0000.00817.37
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.47
8.0.270.0030.00517.13
8.0.260.0060.00016.85
8.0.250.0030.00516.99
8.0.240.0000.00716.88
8.0.230.0030.00317.01
8.0.220.0030.00316.86
8.0.210.0060.00316.90
8.0.200.0000.00717.03
8.0.190.0030.00316.83
8.0.180.0030.00516.90
8.0.170.0040.00316.82
8.0.160.0000.00816.89
8.0.150.0050.00316.84
8.0.140.0040.00416.83
8.0.130.0050.00013.37
8.0.120.0040.00416.87
8.0.110.0030.00616.86
8.0.100.0040.00416.73
8.0.90.0040.00416.96
8.0.80.0080.01216.93
8.0.70.0080.00016.91
8.0.60.0000.00716.76
8.0.50.0000.00816.85
8.0.30.0080.01017.08
8.0.20.0110.00917.40
8.0.10.0000.00717.07
8.0.00.0140.00616.62
7.4.330.0000.00415.07
7.4.320.0030.00616.63
7.4.300.0060.00016.62
7.4.290.0030.00316.52
7.4.280.0030.00316.56
7.4.270.0000.00716.41
7.4.260.0000.00513.27
7.4.250.0060.00316.55
7.4.240.0000.00716.54
7.4.230.0070.00016.50
7.4.220.0180.00016.55
7.4.210.0080.00816.62
7.4.200.0040.00416.61
7.4.190.0070.00016.56
7.4.160.0080.00816.45
7.4.150.0060.01317.40
7.4.140.0100.00717.86
7.4.130.0100.00716.59
7.4.120.0070.01016.49
7.4.110.0140.00316.50
7.4.100.0050.01416.48
7.4.90.0090.00916.48
7.4.80.0070.01719.39
7.4.70.0080.00816.25
7.4.60.0070.01016.62
7.4.50.0090.00016.31
7.4.40.0030.01322.77
7.4.30.0100.01016.57
7.4.00.0090.00614.99
7.3.330.0030.00313.38
7.3.320.0000.00513.37
7.3.310.0000.00716.37
7.3.300.0030.00316.38
7.3.290.0070.00716.30
7.3.280.0080.01016.33
7.3.270.0090.00617.40
7.3.260.0110.01118.24
7.3.250.0130.00416.31
7.3.240.0140.00316.54
7.3.230.0110.00616.39
7.3.210.0070.01016.57
7.3.200.0140.01119.39
7.3.190.0130.00416.38
7.3.180.0060.00916.50
7.3.170.0110.00816.27
7.3.160.0030.01216.29
7.3.120.0070.01014.97
7.2.330.0090.01016.67
7.2.320.0090.01516.72
7.2.310.0120.00616.75
7.2.300.0090.00916.47
7.2.290.0040.01216.70
7.2.110.0130.00416.23
7.2.100.0150.01516.20
7.2.90.0380.00716.18
7.2.80.0100.01116.24
7.2.70.0190.00916.54
7.2.60.0100.01216.82
7.2.50.0180.00316.60
7.2.40.0130.00716.84
7.2.30.0130.01316.78
7.2.20.0440.00316.80
7.2.10.0240.00916.63
7.2.00.0100.00316.70
7.1.230.0230.00615.42
7.1.220.0210.00715.11
7.1.210.0200.00315.35
7.1.200.0120.01315.71
7.1.190.0260.00615.45
7.1.180.0250.00915.29
7.1.170.0150.00315.30
7.1.160.0110.00715.37
7.1.150.0330.00615.63
7.1.140.0210.00515.27
7.1.130.0140.01115.12
7.1.120.0300.00315.18
7.1.110.0290.00415.53
7.1.100.0490.00015.64
7.1.90.0080.01115.55
7.1.80.0110.01515.18
7.1.70.0040.01116.24
7.1.60.0200.00617.21
7.1.50.0200.01225.13
7.1.40.0060.01515.84
7.1.30.0130.01915.70
7.1.20.0170.01115.64
7.1.10.0220.00815.39
7.1.00.0070.02619.02
7.0.310.0230.01015.15
7.0.300.0030.01015.01
7.0.290.0100.01014.89
7.0.280.0140.00915.21
7.0.270.0160.00815.20
7.0.260.0350.00515.15
7.0.250.0190.00515.36
7.0.240.0200.00515.27
7.0.230.0150.01015.30
7.0.220.0110.01314.96
7.0.210.0160.00415.33
7.0.200.0110.00616.02
7.0.190.0210.00915.10
7.0.180.0200.01015.39
7.0.170.0150.00415.33
7.0.160.0140.01115.04
7.0.150.0110.01115.20
7.0.140.0100.04018.48
7.0.130.0090.01115.25
7.0.120.0070.01015.41
7.0.110.0120.00915.18
7.0.100.0120.00515.20
7.0.90.0200.00615.05
7.0.80.0060.03717.59
7.0.70.0160.04017.73
7.0.60.0400.03317.63
7.0.50.0330.03517.65
7.0.40.0070.04516.65
7.0.30.0110.02316.58
7.0.20.0170.03016.66
7.0.10.0050.04716.63
7.0.00.0020.04716.51
5.6.380.0100.00613.87
5.6.370.0370.00713.87
5.6.360.0100.00514.17
5.6.350.0190.01614.04
5.6.340.0400.01014.03
5.6.330.0460.00313.98
5.6.320.0360.00713.98
5.6.310.0110.00913.98
5.6.300.0040.01114.14
5.6.290.0110.00914.04
5.6.280.0070.03817.56
5.6.270.0060.01013.93
5.6.260.0120.00714.12
5.6.250.0100.00514.18
5.6.240.0080.00614.13
5.6.230.0110.04117.36
5.6.220.0030.04017.39
5.6.210.0070.04317.29
5.6.200.0120.04517.58
5.6.190.0040.04917.49
5.6.180.0080.04617.55
5.6.170.0020.02917.41
5.6.160.0120.04117.53
5.6.150.0080.04417.44
5.6.140.0050.04117.43
5.6.130.0060.04917.45
5.6.120.0090.04717.47
5.6.110.0080.04617.50
5.6.100.0020.05117.47
5.6.90.0080.04317.35
5.6.80.0140.03717.21
5.6.70.0120.03717.24
5.6.60.0070.04417.09
5.6.50.0100.03217.27
5.6.40.0070.02717.01
5.6.30.0100.04017.19
5.6.20.0050.02717.13
5.6.10.0120.01717.29
5.6.00.0070.04517.13
5.5.380.0080.00810.96
5.5.370.0070.03015.59
5.5.360.0100.02815.79
5.5.350.0040.04715.75
5.5.340.0070.04315.90
5.5.330.0050.03815.80
5.5.320.0030.04715.92
5.5.310.0060.03315.86
5.5.300.0130.02815.92
5.5.290.0050.04815.91
5.5.280.0060.03615.70
5.5.270.0100.04215.98
5.5.260.0070.04515.77
5.5.250.0030.04415.84
5.5.240.0100.03715.54
5.5.230.0040.03215.38
5.5.220.0080.02815.50
5.5.210.0060.03515.66
5.5.200.0070.02715.54
5.5.190.0050.03315.58
5.5.180.0030.04515.49
5.5.170.0050.00513.98
5.5.160.0030.04015.54
5.5.150.0100.03515.70
5.5.140.0100.02515.44
5.5.130.0050.02715.70
5.5.120.0050.04615.34
5.5.110.0090.03815.62
5.5.100.0080.02815.54
5.5.90.0030.02815.46
5.5.80.0050.03815.39
5.5.70.0070.04215.49
5.5.60.0120.03315.27
5.5.50.0050.04215.51
5.5.40.0130.03015.43
5.5.30.0070.02915.40
5.5.20.0090.02015.23
5.5.10.0060.04315.42
5.5.00.0080.03215.47
5.4.450.0060.04214.83
5.4.440.0050.04514.97
5.4.430.0070.03515.15
5.4.420.0050.04114.99
5.4.410.0020.04714.98
5.4.400.0040.03914.62
5.4.390.0040.04514.82
5.4.380.0020.03914.80
5.4.370.0070.03814.77
5.4.360.0050.04014.89
5.4.350.0050.03514.75
5.4.340.0050.04114.83
5.4.330.0000.00910.68
5.4.320.0080.03514.69
5.4.310.0030.04614.91
5.4.300.0070.03814.69
5.4.290.0150.03314.89
5.4.280.0100.02314.77
5.4.270.0070.04114.59
5.4.260.0080.02314.69
5.4.250.0050.02914.59
5.4.240.0050.03814.91
5.4.230.0060.03814.61
5.4.220.0070.04214.64
5.4.210.0050.03014.52
5.4.200.0050.03514.65
5.4.190.0030.04014.72
5.4.180.0080.03014.74
5.4.170.0080.03914.83
5.4.160.0110.04014.74
5.4.150.0060.03814.85
5.4.140.0040.04213.66
5.4.130.0020.03613.33
5.4.120.0060.02813.48
5.4.110.0030.02513.60
5.4.100.0040.02313.61
5.4.90.0050.04013.57
5.4.80.0080.02313.49
5.4.70.0070.03713.53
5.4.60.0030.04313.57
5.4.50.0070.02713.55
5.4.40.0080.03613.57
5.4.30.0050.04013.42
5.4.20.0050.04213.49
5.4.10.0030.04313.43
5.4.00.0080.03513.42
5.3.290.0060.04012.57
5.3.280.0050.04412.38
5.3.270.0030.03212.50
5.3.260.0100.02212.48
5.3.250.0020.04712.51
5.3.240.0080.03812.32
5.3.230.0080.04012.30
5.3.220.0040.03412.43
5.3.210.0110.03212.45
5.3.200.0060.02412.37
5.3.190.0050.04512.44
5.3.180.0050.04012.49
5.3.170.0100.02312.57
5.3.160.0070.04012.49
5.3.150.0050.02712.55
5.3.140.0100.03212.53
5.3.130.0050.04212.39
5.3.120.0020.03412.35
5.3.110.0020.04212.48
5.3.100.0050.03412.27
5.3.90.0050.03712.23
5.3.80.0020.02812.16
5.3.70.0030.02512.13
5.3.60.0070.02311.99
5.3.50.0080.03712.09
5.3.40.0050.04212.18
5.3.30.0070.02711.88
5.3.20.0120.03512.00
5.3.10.0050.02211.77
5.3.00.0050.02211.86
5.2.170.0030.03610.55
5.2.160.0050.03210.51
5.2.150.0020.03710.46
5.2.140.0020.02010.51
5.2.130.0050.02810.40
5.2.120.0030.02210.45
5.2.110.0040.02510.37
5.2.100.0020.01810.50
5.2.90.0000.01910.51
5.2.80.0050.01510.54
5.2.70.0040.01510.42
5.2.60.0030.02110.47
5.2.50.0080.01310.51
5.2.40.0030.01910.36
5.2.30.0030.01810.48
5.2.20.0080.03010.32
5.2.10.0060.02210.31
5.2.00.0030.02610.33
5.1.60.0050.01210.23
5.1.50.0040.01210.23
5.1.40.0060.01210.23
5.1.30.0020.01410.23
5.1.20.0020.02310.23
5.1.10.0000.02410.23
5.1.00.0000.02410.23
5.0.50.0000.01410.23
5.0.40.0060.02310.23
5.0.30.0060.01310.23
5.0.20.0030.01510.23
5.0.10.0060.01210.23
5.0.00.0070.01510.23
4.4.90.0020.01010.23
4.4.80.0030.00810.23
4.4.70.0020.01210.23
4.4.60.0020.01010.23
4.4.50.0000.01210.23
4.4.40.0020.01310.23
4.4.30.0050.00710.23
4.4.20.0020.00910.23
4.4.10.0000.01210.23
4.4.00.0040.01210.23
4.3.110.0040.00810.23
4.3.100.0040.00910.23
4.3.90.0050.00810.23
4.3.80.0040.01310.23
4.3.70.0040.00710.23
4.3.60.0030.00810.23
4.3.50.0000.01210.23
4.3.40.0030.01110.23
4.3.30.0020.01710.23
4.3.20.0010.01110.23
4.3.10.0030.01610.23
4.3.00.0030.01010.23

preferences:
47.88 ms | 401 KiB | 5 Q