3v4l.org

run code in 300+ PHP versions simultaneously
<?php function returnItems($items) { foreach($items as $item) { yield $item; } } $arr = []; array_push($arr, "ok"); array_push($arr, "dok"); array_push($arr, "odk"); array_push($arr, "okd"); echo returnItems($arr);

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.0120.00616.63
8.3.50.0100.00821.97
8.3.40.0090.00619.02
8.3.30.0090.00619.01
8.3.20.0080.00020.34
8.3.10.0070.00021.79
8.3.00.0040.00419.38
8.2.180.0040.01118.67
8.2.170.0060.01222.96
8.2.160.0110.00322.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0030.00619.56
8.2.110.0060.00319.14
8.2.100.0090.00317.63
8.2.90.0000.00819.22
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0030.00619.65
8.2.50.0050.00318.07
8.2.40.0060.00318.22
8.2.30.0060.00317.98
8.2.20.0070.00017.62
8.2.10.0040.00418.03
8.2.00.0040.00417.69
8.1.280.0090.00625.92
8.1.270.0070.00318.70
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.98
8.1.230.0120.00017.66
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0040.00417.34
8.1.190.0000.00817.22
8.1.180.0030.00518.10
8.1.170.0000.00820.37
8.1.160.0000.00721.95
8.1.150.0000.00718.72
8.1.140.0000.00817.41
8.1.130.0030.00317.73
8.1.120.0030.00717.33
8.1.110.0050.00317.43
8.1.100.0000.00817.26
8.1.90.0070.00017.39
8.1.80.0040.00417.37
8.1.70.0040.00417.45
8.1.60.0000.00817.48
8.1.50.0030.00517.52
8.1.40.0000.00817.54
8.1.30.0000.00817.57
8.1.20.0040.00417.62
8.1.10.0060.00317.44
8.1.00.0030.00617.52
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0030.00318.34
8.0.270.0050.00317.32
8.0.260.0060.00017.25
8.0.250.0000.00716.95
8.0.240.0040.00416.96
8.0.230.0000.00816.97
8.0.220.0000.00716.91
8.0.210.0000.00816.89
8.0.200.0060.00016.90
8.0.190.0040.00416.93
8.0.180.0000.00716.93
8.0.170.0070.00016.89
8.0.160.0000.00716.90
8.0.150.0000.00716.92
8.0.140.0040.00416.89
8.0.130.0030.00313.36
8.0.120.0000.00716.86
8.0.110.0030.00616.90
8.0.100.0000.00816.73
8.0.90.0040.00416.72
8.0.80.0120.00816.77
8.0.70.0050.00216.86
8.0.60.0000.00716.92
8.0.50.0000.00716.89
8.0.30.0140.00917.01
8.0.20.0100.00817.40
8.0.10.0040.00417.01
8.0.00.0110.00916.73
7.4.330.0000.00515.13
7.4.320.0030.00316.43
7.4.300.0100.00016.59
7.4.290.0030.00316.53
7.4.280.0000.00816.59
7.4.270.0070.00016.58
7.4.260.0030.00316.63
7.4.250.0050.00316.37
7.4.240.0020.00516.49
7.4.230.0030.00316.70
7.4.220.0090.01016.60
7.4.210.0030.01216.52
7.4.200.0000.00716.63
7.4.160.0000.01516.45
7.4.150.0150.00317.40
7.4.140.0150.00517.86
7.4.130.0100.00716.48
7.4.120.0060.01316.58
7.4.110.0130.00316.32
7.4.100.0000.01716.34
7.4.90.0080.00816.74
7.4.80.0140.00319.39
7.4.70.0130.00316.54
7.4.60.0070.01016.66
7.4.50.0080.00016.55
7.4.40.0110.00716.61
7.4.30.0100.00716.48
7.4.00.0100.00714.54
7.3.330.0030.00313.13
7.3.320.0040.00913.28
7.3.310.0030.00316.32
7.3.300.0030.00316.31
7.3.290.0070.00816.29
7.3.280.0090.00716.25
7.3.270.0140.00317.40
7.3.260.0030.01416.33
7.3.250.0110.00916.43
7.3.240.0120.00616.61
7.3.230.0070.01116.39
7.3.210.0100.00716.65
7.3.200.0070.01019.39
7.3.190.0140.00716.31
7.3.180.0110.00416.44
7.3.170.0040.01316.33
7.3.160.0090.00616.32
7.3.10.0130.00516.27
7.3.00.0120.00716.60
7.2.330.0070.01116.57
7.2.320.0130.00616.63
7.2.310.0140.00716.58
7.2.300.0100.00716.36
7.2.290.0090.01316.31
7.2.130.0070.00916.42
7.2.120.0100.01016.55
7.2.110.0090.00916.49
7.2.100.0080.00716.38
7.2.90.0090.00716.24
7.2.80.0070.01016.28
7.2.70.0110.00716.52
7.2.60.0060.00816.70
7.2.50.0100.01016.08
7.2.40.0060.00816.42
7.2.30.0120.00416.63
7.2.20.0080.01116.42
7.2.10.0090.00616.54
7.2.00.0030.00917.61
7.1.250.0110.00515.48
7.1.200.0030.00915.80
7.1.100.0060.00617.91
7.1.70.0040.00417.02
7.1.60.0060.01619.50
7.1.50.0140.00734.82
7.1.00.0000.08022.39
7.0.200.0720.00014.61
7.0.140.0070.07321.96
7.0.60.0170.07720.01
7.0.50.0070.08317.93
7.0.40.0030.05320.11
7.0.30.0370.08020.23
7.0.20.0270.05020.11
7.0.10.0230.08720.20
7.0.00.0000.09020.10
5.6.280.0030.07320.86
5.6.210.0070.07020.60
5.6.200.0070.08318.18
5.6.190.0030.04320.39
5.6.180.0230.03720.39
5.6.170.0470.06720.55
5.6.160.0030.04720.47
5.6.150.0070.03718.23
5.6.140.0070.08018.18
5.6.130.0000.05018.15
5.6.120.0070.08320.99
5.6.110.0230.07320.98
5.6.100.0130.03321.14
5.6.90.0170.06721.10
5.6.80.0070.03720.51
5.6.70.0230.07320.48
5.5.350.0130.07720.36
5.5.340.0100.08318.01
5.5.330.0170.07320.31
5.5.320.0200.07720.14
5.5.310.0330.05720.41
5.5.300.0070.07717.98
5.5.290.0100.04317.95
5.5.280.0130.08020.89
5.5.270.0030.04020.77
5.5.260.0200.07720.95
5.5.250.0170.07320.62
5.5.240.0070.08020.18
5.4.450.0600.06019.50
5.4.440.0970.05319.63
5.4.430.0900.05319.58
5.4.420.0730.06019.19
5.4.410.0900.05319.34
5.4.400.0230.07318.83
5.4.390.0170.07718.52
5.4.380.0200.08018.73
5.4.370.0170.06318.66
5.4.360.0230.04718.46
5.4.350.0230.05318.71
5.4.340.0230.05018.57
5.4.320.0400.05718.57
5.4.310.0170.07718.57
5.4.300.0230.07318.67
5.4.290.0230.07318.46
5.4.280.0230.07318.73
5.4.270.0300.06718.51
5.4.260.0270.06018.71
5.4.250.0330.05018.57
5.4.240.0130.06318.72
5.4.230.0230.04718.52
5.4.220.0270.05318.75
5.4.210.0170.05718.43
5.4.200.0270.04716.53
5.4.190.0200.07718.72
5.4.180.0330.04718.69
5.4.170.0130.06718.45
5.4.160.0170.06318.55
5.4.150.0370.04718.71
5.4.140.0130.06016.20
5.4.130.0400.05316.44
5.4.120.0200.05316.18
5.4.110.0270.05016.43
5.4.100.0170.05716.42
5.4.90.0100.06316.28
5.4.80.0200.05016.23
5.4.70.0200.07016.41
5.4.60.0330.06016.41
5.4.50.0170.05316.25
5.4.40.0230.05016.23
5.4.30.0170.07016.16
5.4.20.0230.05016.25
5.4.10.0230.06316.38
5.4.00.0270.04315.89
5.3.290.0130.06314.67
5.3.280.0200.05714.62
5.3.270.0300.06314.78
5.3.260.0270.06714.65
5.3.250.0300.04314.80
5.3.240.0230.05714.61
5.3.230.0100.06714.64
5.3.220.0230.05014.68
5.3.210.0200.07714.60
5.3.200.0270.06014.75
5.3.190.0330.04314.54
5.3.180.0230.05314.77
5.3.170.0230.05014.68
5.3.160.0200.05014.75
5.3.150.0130.06014.53
5.3.140.0170.05714.57
5.3.130.0130.06014.66
5.3.120.0130.06014.53
5.3.110.0170.06014.66
5.3.100.0130.05714.22
5.3.90.0170.05313.99
5.3.80.0230.05314.14
5.3.70.0170.05014.03
5.3.60.0230.05014.11
5.3.50.0300.04314.04
5.3.40.0200.05014.00
5.3.30.0200.04714.10
5.3.20.0200.04713.79
5.3.10.0230.04313.78
5.3.00.0170.05713.69
5.2.170.0130.04311.32
5.2.160.0100.04311.13
5.2.150.0130.04311.23
5.2.140.0200.04711.15
5.2.130.0330.03011.10
5.2.120.0130.04011.11
5.2.110.0270.04711.09
5.2.100.0170.05311.12
5.2.90.0130.04011.06
5.2.80.0170.04311.20
5.2.70.0170.04011.06
5.2.60.0170.04011.14
5.2.50.0200.05711.03
5.2.40.0270.04310.95
5.2.30.0130.04711.01
5.2.20.0130.05010.98
5.2.10.0100.05010.90
5.2.00.0130.04010.89
5.1.60.0130.04010.00
5.1.50.0130.04710.09
5.1.40.0030.04310.00
5.1.30.0100.04010.36
5.1.20.0070.04010.56
5.1.10.0030.04710.09
5.1.00.0130.03710.16
5.0.50.0030.0378.68
5.0.40.0030.0308.51
5.0.30.0070.0508.21
5.0.20.0030.0338.21
5.0.10.0130.0238.15
5.0.00.0100.0438.16
4.4.90.0070.0235.88
4.4.80.0030.0275.91
4.4.70.0030.0235.89
4.4.60.0100.0205.89
4.4.50.0070.0205.96
4.4.40.0070.0335.89
4.4.30.0070.0205.91
4.4.20.0100.0235.97
4.4.10.0030.0275.95
4.4.00.0100.0335.92
4.3.110.0070.0235.93
4.3.100.0070.0235.80
4.3.90.0130.0235.83
4.3.80.0070.0435.79
4.3.70.0070.0205.80
4.3.60.0230.0205.79
4.3.50.0030.0305.89
4.3.40.0000.0475.75
4.3.30.0100.0174.65
4.3.20.0070.0204.59
4.3.10.0030.0234.60
4.3.00.0100.0236.81

preferences:
65.85 ms | 401 KiB | 5 Q