3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &gen(array $array) { yield from $array; } $array = [1, 2, 3]; foreach (gen($array) as &$v) { $v += 1; } var_dump($array);

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.0.110.0030.00516.78
8.0.100.0040.00316.83
8.0.90.0040.00316.68
8.0.80.0000.00816.74
8.0.70.0070.00016.91
8.0.60.0060.00216.72
8.0.50.0030.00416.76
8.0.30.0020.00616.72
8.0.20.0010.00716.76
8.0.10.0040.00416.76
8.0.00.0040.00416.87
7.4.240.0020.00516.47
7.4.230.0020.00516.25
7.4.220.0000.00716.43
7.4.210.0020.00516.32
7.4.200.0030.00516.38
7.4.190.0040.00316.29
7.4.180.0020.00516.33
7.4.160.0040.00416.53
7.4.150.0040.00416.35
7.4.140.0050.00216.25
7.4.130.0020.00516.31
7.4.120.0050.00216.21
7.4.110.0050.00216.28
7.4.100.0020.00616.41
7.4.90.0020.00516.38
7.4.80.0060.00216.22
7.4.70.0040.00416.10
7.4.60.0050.00316.15
7.4.50.0020.00516.01
7.4.40.0050.00516.12
7.4.30.0000.00716.35
7.4.20.0020.00516.23
7.4.10.0040.00416.15
7.4.00.0010.00616.27
7.3.310.0020.00516.15
7.3.300.0060.00216.17
7.3.290.0060.00216.12
7.3.280.0060.00116.12
7.3.270.0070.00016.20
7.3.260.0040.00416.20
7.3.250.0030.00416.16
7.3.240.0040.00416.13
7.3.230.0010.00616.25
7.3.220.0070.00016.11
7.3.210.0040.00416.16
7.3.200.0040.00416.08
7.3.190.0040.00316.07
7.3.180.0000.00816.04
7.3.170.0000.00716.19
7.3.160.0050.00216.14
7.3.150.0000.00716.09
7.3.140.0000.00716.14
7.3.130.0020.00516.11
7.3.120.0020.00516.15
7.3.110.0050.00215.98
7.3.100.0020.00616.11
7.3.90.0020.00516.41
7.3.80.0030.00416.10
7.3.70.0020.00516.19
7.3.60.0020.00516.22
7.3.50.0040.00316.29
7.3.40.0040.00316.19
7.3.30.0000.00716.24
7.3.20.0000.00818.10
7.3.10.0060.00317.97
7.3.00.0030.00518.03
7.2.340.0050.00216.24
7.2.330.0000.00816.20
7.2.320.0100.00016.04
7.2.310.0070.00016.17
7.2.300.0000.00716.12
7.2.290.0030.00516.04
7.2.280.0040.00416.06
7.2.270.0070.00016.04
7.2.260.0040.00416.19
7.2.250.0050.00216.18
7.2.240.0070.00016.04
7.2.230.0080.00016.20
7.2.220.0020.00516.04
7.2.210.0030.00316.14
7.2.200.0040.00416.25
7.2.190.0000.00816.34
7.2.180.0030.00316.26
7.2.170.0000.00816.41
7.2.160.0050.00316.34
7.2.150.0040.00418.03
7.2.140.0050.00218.10
7.2.130.0000.00818.38
7.2.120.0060.00318.35
7.2.110.0080.00018.30
7.2.100.0060.00318.31
7.2.90.0060.00318.34
7.2.80.0000.00918.13
7.2.70.0000.00918.22
7.2.60.0040.00418.30
7.2.50.0000.00718.16
7.2.40.0040.00418.27
7.2.30.0090.00018.18
7.2.20.0080.00018.32
7.2.10.0080.00018.27
7.2.00.0060.00318.25
7.1.330.0040.00417.26
7.1.320.0020.00517.23
7.1.310.0000.00717.21
7.1.300.0040.00417.08
7.1.290.0040.00417.11
7.1.280.0000.00816.97
7.1.270.0050.00317.12
7.1.260.0040.00417.17
7.1.250.0000.00817.05
7.1.240.0050.00317.11
7.1.230.0000.00817.18
7.1.220.0000.00717.17
7.1.210.0040.00417.11
7.1.200.0040.00417.05
7.1.190.0080.00017.11
7.1.180.0080.00016.92
7.1.170.0040.00416.97
7.1.160.0040.00417.06
7.1.150.0000.00817.05
7.1.140.0040.00416.96
7.1.130.0000.00816.91
7.1.120.0000.00816.97
7.1.110.0000.00917.08
7.1.100.0030.00617.02
7.1.90.0030.00616.96
7.1.80.0080.00017.11
7.1.70.0000.00016.81
7.1.60.0090.00017.13
7.1.50.0000.00817.03
7.1.40.0070.00016.89
7.1.30.0080.00017.10
7.1.20.0030.00517.13
7.1.10.0040.00417.08
7.1.00.0040.00416.95
7.0.330.0040.00416.84
7.0.320.0080.00016.73
7.0.310.0060.00316.91
7.0.300.0020.00516.88
7.0.290.0040.00416.87
7.0.280.0030.00516.73
7.0.270.0070.00016.71
7.0.260.0000.00716.65
7.0.250.0080.00016.79
7.0.240.0050.00216.79
7.0.230.0030.00316.93
7.0.220.0080.00016.80
7.0.210.0070.00016.70
7.0.200.0030.00316.95
7.0.190.0040.00416.82
7.0.180.0050.00216.84
7.0.170.0000.00916.90
7.0.160.0030.00516.66
7.0.150.0070.00016.77
7.0.140.0040.00416.88
7.0.130.0040.00417.04
7.0.120.0040.00416.87
7.0.110.0030.00316.83
7.0.100.0080.00016.83
7.0.90.0020.00516.80
7.0.80.0080.00016.58
7.0.70.0030.00516.76
7.0.60.0000.00816.74
7.0.50.0030.00516.74
7.0.40.0040.00416.88
7.0.30.0030.00317.11
7.0.20.0050.00317.06
7.0.10.0040.00417.08
7.0.00.0050.00217.04
5.6.400.0030.00315.72
5.6.390.0000.00715.43
5.6.380.0070.00015.48
5.6.370.0080.00015.52
5.6.360.0000.00815.56
5.6.350.0040.00415.74
5.6.340.0000.00715.73
5.6.330.0080.00015.74
5.6.320.0030.00515.74
5.6.310.0060.00315.53
5.6.300.0060.00315.35
5.6.290.0050.00215.75
5.6.280.0070.00015.68
5.6.270.0040.00415.48
5.6.260.0000.00715.73
5.6.250.0000.00715.51
5.6.240.0030.00315.73
5.6.230.0000.00615.78
5.6.220.0040.00415.63
5.6.210.0030.00315.42
5.6.200.0000.00815.64
5.6.190.0030.00315.70
5.6.180.0070.00015.54
5.6.170.0000.00715.86
5.6.160.0030.00315.76
5.6.150.0000.00815.90
5.6.140.0030.00315.54
5.6.130.0000.00715.54
5.6.120.0070.00015.58
5.6.110.0060.00015.45
5.6.100.0050.00215.42
5.6.90.0030.00315.51
5.6.80.0000.00715.50
5.6.70.0030.00315.67
5.6.60.0030.00315.52
5.6.50.0070.00015.63
5.6.40.0040.00415.47
5.6.30.0000.00615.50
5.6.20.0060.00015.41
5.6.10.0070.00015.42
5.6.00.0030.00315.52
5.5.380.0000.00715.65
5.5.370.0030.00315.78
5.5.360.0050.00215.30
5.5.350.0030.00315.49
5.5.340.0040.00415.48
5.5.330.0000.00715.50
5.5.320.0000.00715.49
5.5.310.0030.00315.32
5.5.300.0000.00715.30
5.5.290.0030.00315.33
5.5.280.0000.00615.41
5.5.270.0030.00315.50
5.5.260.0000.00715.36
5.5.250.0030.00315.62
5.5.240.0070.00015.57
5.5.230.0070.00015.70
5.5.220.0000.00615.61
5.5.210.0050.00315.61
5.5.200.0030.00315.41
5.5.190.0040.00415.49
5.5.180.0000.00715.31
5.5.170.0030.00315.52
5.5.160.0070.00015.38
5.5.150.0000.00615.18
5.5.140.0000.00715.24
5.5.130.0070.00015.17
5.5.120.0040.00415.29
5.5.110.0000.00715.23
5.5.100.0030.00315.55
5.5.90.0070.00015.43
5.5.80.0070.00015.63
5.5.70.0030.00315.57
5.5.60.0070.00015.55
5.5.50.0060.00015.49
5.5.40.0050.00215.57
5.5.30.0070.00015.54
5.5.20.0000.00715.62
5.5.10.0070.00015.46
5.5.00.0070.00015.40
5.4.450.0000.00512.47
5.4.440.0000.00612.49
5.4.430.0020.00212.33
5.4.420.0030.00312.32
5.4.410.0050.00012.39
5.4.400.0000.00512.20
5.4.390.0050.00012.30
5.4.380.0050.00012.46
5.4.370.0050.00012.26
5.4.360.0050.00012.20
5.4.350.0030.00312.49
5.4.340.0050.00012.43
5.4.330.0030.00312.38
5.4.320.0030.00312.46
5.4.310.0050.00012.27
5.4.300.0000.00512.48
5.4.290.0000.00512.49
5.4.280.0030.00312.35
5.4.270.0050.00012.39
5.4.260.0030.00312.41
5.4.250.0050.00012.40
5.4.240.0000.00512.40
5.4.230.0030.00312.01
5.4.220.0000.00512.13
5.4.210.0000.00512.15
5.4.200.0020.00212.18
5.4.190.0000.00512.00
5.4.180.0000.00512.18
5.4.170.0050.00012.07
5.4.160.0050.00012.27
5.4.150.0050.00012.38
5.4.140.0020.00212.45
5.4.130.0000.00512.36
5.4.120.0030.00312.25
5.4.110.0030.00312.38
5.4.100.0000.00512.41
5.4.90.0050.00012.25
5.4.80.0000.00512.42
5.4.70.0000.00512.58
5.4.60.0000.00512.62
5.4.50.0040.00012.19
5.4.40.0000.00512.26
5.4.30.0000.00512.40
5.4.20.0000.00512.38
5.4.10.0030.00312.56
5.4.00.0000.00612.35
5.3.290.0000.00512.70
5.3.280.0030.00312.75
5.3.270.0000.00612.85
5.3.260.0000.00512.88
5.3.250.0060.00012.78
5.3.240.0030.00312.66
5.3.230.0030.00312.94
5.3.220.0020.00212.54
5.3.210.0030.00312.73
5.3.200.0030.00312.71
5.3.190.0000.00512.84
5.3.180.0050.00013.02
5.3.170.0030.00312.70
5.3.160.0050.00012.91
5.3.150.0030.00313.11
5.3.140.0000.00512.84
5.3.130.0030.00312.65
5.3.120.0000.00612.64
5.3.110.0050.00012.84
5.3.100.0000.00612.74
5.3.90.0030.00312.98
5.3.80.0000.00512.73
5.3.70.0000.00512.61
5.3.60.0000.00512.63
5.3.50.0050.00012.55
5.3.40.0000.00512.75
5.3.30.0050.00012.87
5.3.20.0000.00612.82
5.3.10.0030.00312.65
5.3.00.0030.00312.37
5.2.170.0000.00611.97
5.2.160.0050.00011.84
5.2.150.0030.00311.95
5.2.140.0000.00511.71
5.2.130.0000.00511.74
5.2.120.0000.00611.80
5.2.110.0000.00611.64
5.2.100.0030.00311.59
5.2.90.0030.00311.91
5.2.80.0030.00311.68
5.2.70.0000.00511.55
5.2.60.0060.00011.48
5.2.50.0020.00211.81
5.2.40.0020.00211.88
5.2.30.0000.00411.73
5.2.20.0000.00511.46
5.2.10.0020.00211.50
5.2.00.0000.00511.45
5.1.60.0000.00511.09
5.1.50.0000.00510.68
5.1.40.0000.00410.80
5.1.30.0050.00011.00
5.1.20.0050.00010.71
5.1.10.0020.00210.74
5.1.00.0000.00410.99
5.0.50.0000.00410.61
5.0.40.0040.00010.61
5.0.30.0000.00410.61
5.0.20.0000.00410.61
5.0.10.0040.00010.61
5.0.00.0000.00310.61
4.4.90.0000.00210.61
4.4.80.0030.00010.61
4.4.70.0030.00010.61
4.4.60.0000.00210.61
4.4.50.0020.00010.61
4.4.40.0020.00010.61
4.4.30.0000.00310.61
4.4.20.0020.00010.61
4.4.10.0000.00310.61
4.4.00.0000.00310.61
4.3.110.0030.00010.61
4.3.100.0000.00210.61
4.3.90.0020.00010.61
4.3.80.0000.00310.61
4.3.70.0000.00210.61
4.3.60.0000.00210.61
4.3.50.0000.00310.61
4.3.40.0000.00210.61
4.3.30.0020.00010.61
4.3.20.0020.00010.61
4.3.10.0030.00010.61
4.3.00.0020.00010.61

preferences:
39.72 ms | 406 KiB | 5 Q