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(3); echo $gen->current(); $gen->next(); echo $gen->current(); $gen->send(1); // injecting a value; echo $gen->current(); $gen->next(); echo $gen->current(); $gen->next(); echo $gen->current();

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.01418.31
8.3.50.0140.00321.14
8.3.40.0100.00718.49
8.3.30.0130.00020.31
8.3.20.0060.00320.54
8.3.10.0080.00021.09
8.3.00.0060.00323.59
8.2.180.0120.00616.75
8.2.170.0040.01122.96
8.2.160.0070.01020.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00020.94
8.2.110.0060.00619.39
8.2.100.0040.00817.72
8.2.90.0080.00019.17
8.2.80.0040.00419.34
8.2.70.0040.00417.63
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0000.01118.22
8.2.30.0040.00419.45
8.2.20.0050.00317.72
8.2.10.0080.00017.70
8.2.00.0050.00217.71
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0100.00022.46
8.1.230.0090.00320.97
8.1.220.0080.00018.77
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00217.53
8.1.180.0040.00418.10
8.1.170.0030.00518.63
8.1.160.0040.00418.74
8.1.150.0080.00018.60
8.1.140.0000.00717.47
8.1.130.0030.00317.81
8.1.120.0040.00317.45
8.1.110.0090.00017.45
8.1.100.0000.00717.47
8.1.90.0070.00017.53
8.1.80.0030.00517.49
8.1.70.0030.00317.33
8.1.60.0030.00617.55
8.1.50.0030.00617.41
8.1.40.0050.00517.55
8.1.30.0080.00017.54
8.1.20.0030.00517.56
8.1.10.0040.00417.58
8.1.00.0050.00317.37
8.0.300.0040.00419.90
8.0.290.0050.00217.04
8.0.280.0000.00718.32
8.0.270.0050.00217.22
8.0.260.0000.00616.72
8.0.250.0000.00716.98
8.0.240.0030.00316.84
8.0.230.0030.00316.96
8.0.220.0070.00016.96
8.0.210.0040.00516.89
8.0.200.0030.00316.84
8.0.190.0000.00816.85
8.0.180.0000.00716.93
8.0.170.0000.00716.91
8.0.160.0000.00716.76
8.0.150.0000.00716.80
8.0.140.0040.00416.73
8.0.130.0000.00613.26
8.0.120.0040.00416.89
8.0.110.0000.00816.71
8.0.100.0040.00416.83
8.0.90.0040.00416.77
8.0.80.0110.00316.80
8.0.70.0040.00416.93
8.0.60.0020.00516.77
8.0.50.0040.00416.75
8.0.30.0130.00917.15
8.0.20.0130.00517.40
8.0.10.0040.00417.13
8.0.00.0090.00916.89
7.4.330.0000.00414.98
7.4.320.0000.00916.47
7.4.300.0000.00616.46
7.4.290.0070.00016.45
7.4.280.0030.00616.64
7.4.270.0040.00416.61
7.4.260.0070.00013.20
7.4.250.0000.00916.59
7.4.240.0000.00716.65
7.4.230.0000.00716.43
7.4.220.0100.00716.55
7.4.210.0070.00916.58
7.4.200.0030.00316.59
7.4.190.0000.00716.57
7.4.160.0060.00916.50
7.4.150.0180.00617.40
7.4.140.0070.01017.86
7.4.130.0060.01116.51
7.4.120.0100.00716.51
7.4.110.0140.00316.39
7.4.100.0100.00616.44
7.4.90.0130.00316.47
7.4.80.0030.01419.39
7.4.70.0060.01016.61
7.4.60.0060.01016.54
7.4.50.0060.00316.64
7.4.40.0000.01522.77
7.4.30.0140.00716.44
7.4.00.0070.01014.90
7.3.330.0050.00013.43
7.3.320.0000.00513.34
7.3.310.0070.00016.21
7.3.300.0030.00316.38
7.3.290.0100.00316.28
7.3.280.0080.00916.35
7.3.270.0090.00917.40
7.3.260.0080.01118.24
7.3.250.0100.00916.52
7.3.240.0070.01416.67
7.3.230.0100.00616.62
7.3.210.0060.01016.64
7.3.200.0140.00319.39
7.3.190.0060.00916.37
7.3.180.0060.00916.55
7.3.170.0110.00716.29
7.3.160.0140.00516.44
7.3.120.0040.01114.85
7.3.00.0070.00716.61
7.2.330.0040.01516.63
7.2.320.0150.00916.79
7.2.310.0070.01016.44
7.2.300.0150.00616.66
7.2.290.0100.00616.66
7.2.130.0030.01016.96
7.2.120.0090.00616.83
7.2.110.0100.00716.89
7.2.100.0070.00716.77
7.2.90.0070.00716.96
7.2.80.0060.00616.82
7.2.70.0080.00416.94
7.2.60.0110.00916.85
7.2.50.0090.00316.59
7.2.40.0120.00316.63
7.2.30.0100.00316.87
7.2.20.0070.00416.93
7.2.10.0070.00416.74
7.2.00.0060.00317.02
7.1.250.0060.00615.76
7.1.240.0090.00615.66
7.1.230.0070.00315.70
7.1.220.0030.00815.80
7.1.210.0040.01115.53
7.1.200.0070.00715.76
7.1.190.0040.00415.87
7.1.180.0080.00415.79
7.1.170.0040.01115.41
7.1.160.0030.00715.81
7.1.150.0130.00315.82
7.1.140.0090.00615.74
7.1.130.0070.01015.78
7.1.120.0000.01415.49
7.1.110.0030.00615.77
7.1.100.0090.00015.84
7.1.90.0000.00915.76
7.1.80.0110.00315.66
7.1.70.0060.00616.45
7.1.60.0100.00717.51
7.1.50.0090.00916.27
7.1.40.0140.00415.86
7.1.30.0040.00415.55
7.1.20.0100.00715.74
7.1.10.0000.01515.68
7.1.00.0040.03518.92
7.0.330.0100.00615.36
7.0.320.0030.01315.48
7.0.310.0100.00315.33
7.0.300.0060.01015.30
7.0.290.0120.00615.30
7.0.280.0040.01115.21
7.0.270.0060.00915.57
7.0.260.0040.01115.29
7.0.250.0070.00715.25
7.0.240.0030.01015.33
7.0.230.0080.00015.55
7.0.220.0040.01115.39
7.0.210.0060.00615.19
7.0.200.0030.00815.95
7.0.190.0070.00715.13
7.0.180.0090.00615.49
7.0.170.0000.01515.42
7.0.160.0000.01115.51
7.0.150.0080.00315.25
7.0.140.0050.04218.76
7.0.130.0060.00615.43
7.0.120.0110.00715.19
7.0.110.0000.00815.17
7.0.100.0080.04117.70
7.0.90.0100.04717.60
7.0.80.0080.04217.69
7.0.70.0070.04317.69
7.0.60.0070.02617.68
7.0.50.0240.03817.82
7.0.40.0130.03716.83
7.0.30.0160.04016.82
7.0.20.0090.04016.74
7.0.10.0070.04416.66
7.0.00.0120.03916.90
5.6.380.0070.00714.57
5.6.370.0040.00814.77
5.6.360.0030.01014.32
5.6.350.0030.01014.44
5.6.340.0000.00914.40
5.6.330.0060.00914.30
5.6.320.0070.00714.21
5.6.310.0070.00414.35
5.6.300.0070.00713.98
5.6.290.0090.00014.45
5.6.280.0060.03817.66
5.6.270.0040.01114.50
5.6.260.0100.00314.29
5.6.250.0060.04617.53
5.6.240.0080.04617.49
5.6.230.0090.04317.35
5.6.220.0130.04217.64
5.6.210.0060.03317.35
5.6.200.0120.02317.75
5.6.190.0060.04517.68
5.6.180.0070.04517.73
5.6.170.0070.04217.53
5.6.160.0140.04017.70
5.6.150.0070.04517.73
5.6.140.0110.04117.73
5.6.130.0050.04517.76
5.6.120.0100.04217.75
5.6.110.0050.04917.65
5.6.100.0070.04417.74
5.6.90.0050.05017.63
5.6.80.0050.04517.25
5.6.70.0090.04117.39
5.6.60.0070.02617.27
5.6.50.0090.03517.31
5.6.40.0090.03717.37
5.6.30.0140.04017.36
5.6.20.0060.04317.22
5.6.10.0050.04617.26
5.6.00.0090.04417.35
5.5.380.0040.04615.79
5.5.370.0090.04115.81
5.5.360.0060.02515.90
5.5.350.0070.04215.77
5.5.340.0120.03816.05
5.5.330.0030.02715.99
5.5.320.0050.04216.01
5.5.310.0080.02816.05
5.5.300.0080.04116.05
5.5.290.0030.04716.03
5.5.280.0020.03115.98
5.5.270.0080.04616.01
5.5.260.0080.04316.05
5.5.250.0050.03015.96
5.5.240.0070.04315.60
5.5.230.0090.04115.72
5.5.220.0060.04115.72
5.5.210.0070.04215.72
5.5.200.0080.03915.64
5.5.190.0100.03815.68
5.5.180.0020.04515.75
5.5.170.0030.00311.18
5.5.160.0080.04115.72
5.5.150.0080.04015.70
5.5.140.0090.03815.65
5.5.130.0110.03715.65
5.5.120.0090.04115.69
5.5.110.0100.03815.72
5.5.100.0050.04115.69
5.5.90.0070.04215.63
5.5.80.0050.04015.58
5.5.70.0060.03815.55
5.5.60.0030.04515.67
5.5.50.0100.03815.60
5.5.40.0050.02315.62
5.5.30.0010.04415.55
5.5.20.0070.02515.59
5.5.10.0070.04015.65
5.5.00.0150.03815.57
5.4.450.0040.04515.32
5.4.440.0100.03815.34
5.4.430.0080.04215.31
5.4.420.0050.04015.33
5.4.410.0020.03215.26
5.4.400.0080.03015.21
5.4.390.0030.02415.01
5.4.380.0020.04315.11
5.4.370.0030.04115.19
5.4.360.0060.03515.15
5.4.350.0000.04415.20
5.4.340.0030.03315.11
5.4.330.0070.00311.18
5.4.320.0140.03215.11
5.4.310.0070.04215.04
5.4.300.0070.03815.19
5.4.290.0070.02315.04
5.4.280.0070.03715.13
5.4.270.0050.04215.02
5.4.260.0050.04115.17
5.4.250.0150.02515.20
5.4.240.0050.04215.11
5.4.230.0080.04215.19
5.4.220.0060.04115.14
5.4.210.0040.02515.01
5.4.200.0020.03315.19
5.4.190.0080.03315.19
5.4.180.0070.04215.19
5.4.170.0020.02415.15
5.4.160.0070.03515.16
5.4.150.0050.04315.16
5.4.140.0070.04013.81
5.4.130.0070.03313.83
5.4.120.0090.02413.78
5.4.110.0100.03513.73
5.4.100.0060.03913.85
5.4.90.0060.04213.72
5.4.80.0070.02413.80
5.4.70.0050.02513.77
5.4.60.0050.03613.83
5.4.50.0030.03613.75
5.4.40.0060.03513.78
5.4.30.0110.02013.81
5.4.20.0070.03913.82
5.4.10.0050.03813.73
5.4.00.0080.02813.54
5.3.290.0000.03512.91
5.3.280.0070.03412.87
5.3.270.0050.03712.95
5.3.260.0050.04112.92
5.3.250.0050.04212.89
5.3.240.0090.03612.93
5.3.230.0050.03312.85
5.3.220.0110.04012.86
5.3.210.0070.04012.88
5.3.200.0100.03512.87
5.3.190.0070.04012.84
5.3.180.0050.04312.94
5.3.170.0030.02512.90
5.3.160.0050.03412.88
5.3.150.0060.03612.87
5.3.140.0060.02512.88
5.3.130.0050.04012.90
5.3.120.0070.04012.93
5.3.110.0090.03712.92
5.3.100.0060.03512.64
5.3.90.0060.03812.63
5.3.80.0060.04112.63
5.3.70.0070.04112.66
5.3.60.0080.03912.58
5.3.50.0050.02912.62
5.3.40.0050.03712.52
5.3.30.0080.03512.53
5.3.20.0020.04012.45
5.3.10.0070.03312.49
5.3.00.0060.03512.42
5.2.170.0070.03511.18
5.2.160.0080.01811.15
5.2.150.0050.03311.09
5.2.140.0030.03111.10
5.2.130.0040.02111.14
5.2.120.0040.03211.16
5.2.110.0060.03111.20
5.2.100.0020.02711.17
5.2.90.0010.02311.15
5.2.80.0080.03011.07
5.2.70.0050.02011.19
5.2.60.0080.02511.15
5.2.50.0050.03011.12
5.2.40.0080.02811.12
5.2.30.0100.03011.11
5.2.20.0030.03411.10
5.2.10.0030.03411.05
5.2.00.0060.03011.04
5.1.60.0030.02911.04
5.1.50.0050.02711.04
5.1.40.0020.03011.04
5.1.30.0090.02711.04
5.1.20.0050.03111.04
5.1.10.0050.02711.04
5.1.00.0020.03011.04
5.0.50.0090.01811.04
5.0.40.0030.02211.04
5.0.30.0000.03911.04
5.0.20.0020.02011.04
5.0.10.0060.01711.04
5.0.00.0080.02711.04
4.4.90.0020.02011.04
4.4.80.0020.02011.04
4.4.70.0060.01511.04
4.4.60.0060.01611.04
4.4.50.0020.01911.04
4.4.40.0030.02711.04
4.4.30.0000.02211.04
4.4.20.0060.01511.04
4.4.10.0030.01111.04
4.4.00.0030.02711.04
4.3.110.0030.01911.04
4.3.100.0020.01811.04
4.3.90.0050.01711.04
4.3.80.0000.03011.04
4.3.70.0020.02011.04
4.3.60.0070.01511.04
4.3.50.0030.02011.04
4.3.40.0040.02511.04
4.3.30.0030.01811.04
4.3.20.0030.01911.04
4.3.10.0000.02211.04
4.3.00.0000.01811.04

preferences:
42.92 ms | 401 KiB | 5 Q