3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &gen_reference() { $data = [77,78,79]; foreach($data as $value ) { yield $value; } } $it = gen_reference(); foreach ($it as &$number) { echo $number *= -1,"\n"; } // Must unset $number ... $it = gen_reference(); foreach($it as $number){ echo $number; }

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.0030.01716.63
8.3.50.0100.01021.99
8.3.40.0100.00718.79
8.3.30.0070.00719.04
8.3.20.0080.00020.34
8.3.10.0070.00023.65
8.3.00.0080.00020.64
8.2.180.0080.00816.50
8.2.170.0140.00022.96
8.2.160.0140.00022.08
8.2.150.0090.00024.18
8.2.140.0000.01524.66
8.2.130.0070.00026.16
8.2.120.0040.00422.29
8.2.110.0080.00022.27
8.2.100.0080.00417.72
8.2.90.0050.00319.21
8.2.80.0040.00417.97
8.2.70.0000.01117.63
8.2.60.0030.00618.05
8.2.50.0080.00018.07
8.2.40.0060.00318.16
8.2.30.0050.00218.05
8.2.20.0040.00417.65
8.2.10.0060.00317.76
8.2.00.0080.00017.75
8.1.280.0040.01125.92
8.1.270.0030.00523.97
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0030.00623.85
8.1.230.0000.01119.10
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0030.00517.66
8.1.180.0030.00518.10
8.1.170.0060.00318.63
8.1.160.0060.00321.96
8.1.150.0000.00718.64
8.1.140.0000.00717.43
8.1.130.0040.00417.75
8.1.120.0070.00017.45
8.1.110.0060.00317.35
8.1.100.0040.00417.33
8.1.90.0030.00317.48
8.1.80.0040.00417.36
8.1.70.0000.00717.39
8.1.60.0080.00417.50
8.1.50.0040.00417.39
8.1.40.0080.00017.52
8.1.30.0040.00417.57
8.1.20.0000.00717.64
8.1.10.0020.00517.38
8.1.00.0040.00417.45
8.0.300.0000.00818.77
8.0.290.0000.00717.18
8.0.280.0030.00318.38
8.0.270.0030.00317.27
8.0.260.0030.00316.75
8.0.250.0030.00316.96
8.0.240.0000.00716.92
8.0.230.0030.00316.88
8.0.220.0040.00416.80
8.0.210.0000.00816.93
8.0.200.0040.00416.98
8.0.190.0050.00516.94
8.0.180.0000.00716.92
8.0.170.0070.00016.84
8.0.160.0000.00716.87
8.0.150.0000.00816.91
8.0.140.0030.00316.83
8.0.130.0060.00013.33
8.0.120.0040.00416.82
8.0.110.0000.00716.89
8.0.100.0030.00616.71
8.0.90.0000.00716.80
8.0.80.0090.01316.82
8.0.70.0000.00816.97
8.0.60.0040.00416.81
8.0.50.0000.00717.02
8.0.30.0080.01517.09
8.0.20.0120.00717.40
8.0.10.0070.00016.88
8.0.00.0140.00616.56
7.4.330.0050.00015.00
7.4.320.0030.00316.63
7.4.300.0030.00316.49
7.4.290.0040.00416.54
7.4.280.0000.00716.41
7.4.270.0040.00416.62
7.4.260.0030.00316.47
7.4.250.0050.00216.57
7.4.240.0000.00716.49
7.4.230.0030.00316.36
7.4.220.0090.00916.65
7.4.210.0060.01016.56
7.4.200.0070.00016.40
7.4.190.0050.00316.75
7.4.160.0060.00916.41
7.4.150.0070.01017.40
7.4.140.0100.00717.86
7.4.130.0080.00816.58
7.4.120.0090.00816.45
7.4.110.0070.01016.62
7.4.100.0150.00616.48
7.4.90.0090.01816.46
7.4.80.0070.01016.59
7.4.70.0000.01716.58
7.4.60.0150.00016.36
7.4.50.0050.00316.50
7.4.40.0120.00322.77
7.4.30.0090.00916.62
7.4.00.0090.00614.79
7.3.330.0050.00013.39
7.3.320.0030.00313.18
7.3.310.0000.00616.21
7.3.300.0030.00316.33
7.3.290.0060.00916.44
7.3.280.0050.01116.36
7.3.270.0090.00917.40
7.3.260.0160.00616.42
7.3.250.0130.00416.53
7.3.240.0060.01016.39
7.3.230.0100.00716.60
7.3.210.0100.00716.54
7.3.200.0070.01019.39
7.3.190.0070.01016.41
7.3.180.0030.01316.30
7.3.170.0060.01016.67
7.3.160.0080.00816.29
7.3.120.0040.00814.91
7.2.330.0040.01316.51
7.2.320.0050.01116.74
7.2.310.0190.00316.68
7.2.300.0070.01116.72
7.2.290.0060.00916.76
7.2.00.0000.01219.39
7.1.100.0100.00317.78
7.1.70.0070.00317.30
7.1.60.0180.00719.29
7.1.50.0070.01316.73
7.1.00.0100.07022.43
7.0.200.0030.00716.73
7.0.140.0000.07722.00
7.0.60.0000.06320.00
7.0.50.0070.04017.85
7.0.40.0100.08320.40
7.0.30.0170.05320.13
7.0.20.0400.04720.16
7.0.10.0030.05020.23
7.0.00.0130.07720.07
5.6.280.0100.06720.93
5.6.210.0000.09020.55
5.6.200.0030.09018.27
5.6.190.0100.06320.61
5.6.180.0300.07720.64
5.6.170.0200.04320.55
5.6.160.0070.05020.50
5.6.150.0070.04018.18
5.6.140.0030.08718.17
5.6.130.0100.07718.19
5.6.120.0070.05021.02
5.6.110.0130.06720.98
5.6.100.0000.05320.98
5.6.90.0170.07020.95
5.6.80.0130.06720.41
5.5.350.0230.04720.43
5.5.340.0000.05017.98
5.5.330.0130.07720.44
5.5.320.0200.04020.21
5.5.310.0330.08320.36
5.5.300.0030.04018.07
5.5.290.0030.07317.98
5.5.280.0070.08320.88
5.5.270.0030.07720.75
5.5.260.0070.07020.87
5.5.250.0170.04720.68
5.5.240.0070.07320.04
5.4.450.0570.05019.20
5.4.440.0330.04319.54
5.4.430.1400.03319.19
5.4.420.0000.03719.54
5.4.410.1070.04019.51
5.4.400.1530.04719.32
5.4.390.0830.03019.31
5.4.380.0300.05718.77
5.4.370.0270.05718.62
5.4.360.0300.05718.78
5.4.350.0400.04318.78
5.4.340.0300.05718.72
5.4.320.0060.04112.52
5.4.310.0040.03912.52
5.4.300.0100.04612.52
5.4.290.0050.03712.51
5.4.280.0080.03712.41
5.4.270.0060.03812.41
5.4.260.0050.03812.41
5.4.250.0070.03512.41
5.4.240.0050.03612.41
5.4.230.0040.03812.40
5.4.220.0200.04112.38
5.4.210.0130.04712.38
5.4.200.0200.05312.38
5.4.190.0210.04312.38
5.4.180.0220.04512.38
5.4.170.0170.04912.39
5.4.160.0200.04812.38
5.4.150.0200.04612.38
5.4.140.0230.04212.07
5.4.130.0150.04812.05
5.4.120.0310.06812.02
5.4.110.0190.04812.02
5.4.100.0150.05012.02
5.4.90.0180.04712.02
5.4.80.0170.04412.02
5.4.70.0150.04112.02
5.4.60.0160.04512.02
5.4.50.0120.04712.02
5.4.40.0210.04412.00
5.4.30.0180.04412.00
5.4.20.0160.04211.98
5.4.10.0180.04011.99
5.4.00.0170.04011.49
5.3.290.0080.04212.80
5.3.280.0080.03512.71
5.3.270.0190.04812.72
5.3.260.0200.04612.72
5.3.250.0160.04912.72
5.3.240.0150.04712.72
5.3.230.0190.04612.71
5.3.220.0150.05012.68
5.3.210.0190.04912.68
5.3.200.0140.05012.68
5.3.190.0190.05012.68
5.3.180.0180.04512.67
5.3.170.0170.05012.67
5.3.160.0180.04812.68
5.3.150.0190.05112.67
5.3.140.0150.04812.66
5.3.130.0180.04612.65
5.3.120.0150.04912.66
5.3.110.0210.04512.65
5.3.100.0180.04812.12
5.3.90.0200.04212.08
5.3.80.0190.04512.08
5.3.70.0150.05312.08
5.3.60.0140.05112.07
5.3.50.0150.04812.00
5.3.40.0180.04712.00
5.3.30.0170.04511.96
5.3.20.0160.04811.74
5.3.10.0200.04211.70
5.3.00.0160.04311.70
5.2.170.0210.0349.20
5.2.160.0130.0429.20
5.2.150.0130.0419.20
5.2.140.0140.0399.20
5.2.130.0410.1069.16
5.2.120.0190.0389.16
5.2.110.0140.0449.16
5.2.100.0300.0559.16
5.2.90.0170.0399.15
5.2.80.0180.0389.14
5.2.70.0210.0359.14
5.2.60.0400.0799.10
5.2.50.0160.0409.07
5.2.40.0160.0369.05
5.2.30.0440.1059.02
5.2.20.0130.0419.02
5.2.10.0110.0478.93
5.2.00.0160.0398.77
5.1.60.0200.0618.06
5.1.50.0100.0368.06
5.1.40.0130.0288.04
5.1.30.0140.0348.39
5.1.20.0120.0358.42
5.1.10.0130.0348.14
5.1.00.0090.0358.13
5.0.50.0120.0266.61
5.0.40.0100.0266.48
5.0.30.0170.0366.30
5.0.20.0110.0276.26
5.0.10.0100.0236.23
5.0.00.0100.0406.22
4.4.90.0100.0214.78
4.4.80.0070.0214.76
4.4.70.0090.0204.75
4.4.60.0110.0234.75
4.4.50.0130.0234.77
4.4.40.0140.0264.71
4.4.30.0080.0204.75
4.4.20.0080.0204.85
4.4.10.0130.0174.85
4.4.00.0210.0494.76
4.3.110.0140.0154.67
4.3.100.0100.0204.66
4.3.90.0110.0194.63
4.3.80.0070.0304.58
4.3.70.0060.0254.63
4.3.60.0120.0184.63
4.3.50.0090.0194.63
4.3.40.0070.0314.54
4.3.30.0100.0163.29
4.3.20.0160.0723.28
4.3.10.0060.0193.24
4.3.00.0300.02012.57

preferences:
53.21 ms | 401 KiB | 5 Q