3v4l.org

run code in 300+ PHP versions simultaneously
<?php function returnItems($items) { foreach($items as $item) { echo $item . "\n"; // yield $item; } } $arr = []; array_push($arr, "ok"); array_push($arr, "dok"); array_push($arr, "odk"); array_push($arr, "okd"); print_r(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.0140.00716.75
8.3.50.0130.00718.20
8.3.40.0140.00418.55
8.3.30.0070.00719.04
8.3.20.0080.00020.30
8.3.10.0000.00721.90
8.3.00.0090.00019.13
8.2.180.0170.00316.38
8.2.170.0070.00722.96
8.2.160.0070.00722.11
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0120.00319.76
8.2.110.0040.00421.12
8.2.100.0080.00317.63
8.2.90.0070.00019.23
8.2.80.0000.00917.97
8.2.70.0000.00917.63
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0050.00318.22
8.2.30.0000.00717.94
8.2.20.0030.00517.69
8.2.10.0000.00818.09
8.2.00.0050.00217.77
8.1.280.0070.01425.92
8.1.270.0030.00618.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00319.07
8.1.230.0090.00317.65
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0000.00920.36
8.1.160.0040.00422.01
8.1.150.0040.00418.76
8.1.140.0000.00717.40
8.1.130.0000.00717.75
8.1.120.0100.00017.51
8.1.110.0050.00217.46
8.1.100.0040.00417.52
8.1.90.0030.00317.47
8.1.80.0020.00517.36
8.1.70.0030.00317.48
8.1.60.0040.00417.56
8.1.50.0000.00817.50
8.1.40.0060.00317.34
8.1.30.0030.00617.53
8.1.20.0000.00817.58
8.1.10.0060.00317.53
8.1.00.0030.00617.42
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.43
8.0.270.0050.00317.18
8.0.260.0030.00317.25
8.0.250.0000.00716.98
8.0.240.0060.00016.82
8.0.230.0000.00716.85
8.0.220.0070.00016.74
8.0.210.0070.00016.77
8.0.200.0000.00616.96
8.0.190.0030.00516.95
8.0.180.0000.00716.91
8.0.170.0040.00416.81
8.0.160.0070.00016.90
8.0.150.0000.00716.79
8.0.140.0000.00816.89
8.0.130.0000.00613.29
8.0.120.0040.00416.74
8.0.110.0040.00416.85
8.0.100.0040.00416.84
8.0.90.0000.00716.92
8.0.80.0030.01216.89
8.0.70.0040.00416.95
8.0.60.0070.00016.75
8.0.50.0040.00416.76
8.0.30.0100.01117.22
8.0.20.0100.00917.40
8.0.10.0040.00416.98
8.0.00.0140.00616.82
7.4.330.0050.00015.15
7.4.320.0030.00316.60
7.4.300.0030.00616.57
7.4.290.0030.00316.62
7.4.280.0000.00816.35
7.4.270.0030.00316.64
7.4.260.0030.00316.57
7.4.250.0030.00516.57
7.4.240.0020.00516.49
7.4.230.0040.00416.66
7.4.220.0200.00316.68
7.4.210.0080.01216.55
7.4.200.0040.00416.65
7.4.160.0080.01216.59
7.4.150.0080.01117.40
7.4.140.0190.01717.86
7.4.130.0120.00616.53
7.4.120.0080.00816.57
7.4.110.0120.00616.36
7.4.100.0130.01016.55
7.4.90.0080.01116.57
7.4.80.0120.00619.39
7.4.70.0070.01616.56
7.4.60.0070.01116.48
7.4.50.0000.00516.39
7.4.40.0150.00916.39
7.4.30.0080.00916.63
7.4.00.0070.01014.86
7.3.330.0000.00513.32
7.3.320.0090.00313.30
7.3.310.0000.00716.40
7.3.300.0000.00716.35
7.3.290.0060.00716.27
7.3.280.0110.01016.26
7.3.270.0220.00017.40
7.3.260.0060.01216.48
7.3.250.0090.01216.42
7.3.240.0030.01416.49
7.3.230.0130.00716.46
7.3.210.0070.01016.35
7.3.200.0120.00619.39
7.3.190.0120.00916.45
7.3.180.0110.00716.58
7.3.170.0130.00316.27
7.3.160.0020.01416.69
7.3.10.0070.00716.33
7.3.00.0040.01116.30
7.2.330.0170.00016.79
7.2.320.0110.01116.72
7.2.310.0100.01316.79
7.2.300.0080.00816.41
7.2.290.0150.00316.59
7.2.130.0050.00516.19
7.2.120.0080.01116.49
7.2.110.0130.00916.73
7.2.100.0040.01116.50
7.2.90.0100.00716.80
7.2.80.0090.00916.85
7.2.70.0080.00816.64
7.2.60.0120.00316.75
7.2.50.0060.01316.70
7.2.40.0070.01416.82
7.2.30.0140.01116.65
7.2.20.0090.00616.68
7.2.10.0120.01216.63
7.2.00.0070.01018.06
7.1.250.0170.00015.69
7.1.200.0070.00015.63
7.1.100.0030.00618.18
7.1.70.0030.01217.22
7.1.60.0090.01319.50
7.1.50.0030.01416.41
7.1.00.0070.07322.46
7.0.200.0690.00714.77
7.0.140.0100.06322.08
7.0.60.0070.08319.95
7.0.50.0100.07717.95
7.0.40.0100.07720.23
7.0.30.0330.03720.08
7.0.20.0070.05020.10
7.0.10.0230.06020.06
7.0.00.0030.04320.19
5.6.280.0030.07321.11
5.6.210.0070.03720.50
5.6.200.0070.08318.14
5.6.190.0000.07320.57
5.6.180.0200.04020.52
5.6.170.0300.07320.51
5.6.160.0070.06320.47
5.6.150.0070.03718.28
5.6.140.0070.06018.27
5.6.130.0070.07318.29
5.6.120.0070.04321.02
5.6.110.0070.04320.98
5.6.100.0030.04320.99
5.6.90.0030.04020.94
5.6.80.0000.04320.53
5.6.70.0170.07320.35
5.5.350.0170.07720.35
5.5.340.0100.05318.09
5.5.330.0100.03720.20
5.5.320.0270.06720.21
5.5.310.0300.06720.29
5.5.300.0130.07317.95
5.5.290.0100.06717.97
5.5.280.0130.07720.90
5.5.270.0030.04320.82
5.5.260.0000.04320.71
5.5.250.0100.08320.70
5.5.240.0130.03720.17
5.4.450.0700.07019.58
5.4.440.0900.05019.17
5.4.430.0870.05019.38
5.4.420.0730.05319.61
5.4.410.0100.05319.04
5.4.400.0200.06018.81
5.4.390.0230.05318.78
5.4.380.0200.05718.73
5.4.370.0170.05718.66
5.4.360.0130.06318.81
5.4.350.0300.06318.66
5.4.340.0170.06718.76
5.4.320.0230.06718.58
5.4.310.0300.07318.50
5.4.300.0170.06018.74
5.4.290.0230.07318.73
5.4.280.0270.06718.57
5.4.270.0270.04718.73
5.4.260.0130.07318.49
5.4.250.0330.06718.57
5.4.240.0130.06318.52
5.4.230.0230.05718.55
5.4.220.0270.06318.47
5.4.210.0200.05718.65
5.4.200.0230.04716.64
5.4.190.0300.05018.61
5.4.180.0270.04718.79
5.4.170.0300.05318.44
5.4.160.0270.05318.50
5.4.150.0270.06718.72
5.4.140.0200.05016.30
5.4.130.0330.05016.16
5.4.120.0300.04716.15
5.4.110.0300.04316.28
5.4.100.0230.06016.19
5.4.90.0200.06316.33
5.4.80.0200.04716.29
5.4.70.0270.07016.22
5.4.60.0400.05316.14
5.4.50.0230.07016.37
5.4.40.0270.05016.27
5.4.30.0200.05316.26
5.4.20.0200.05016.27
5.4.10.0230.06716.16
5.4.00.0230.05015.88
5.3.290.0300.04314.68
5.3.280.0130.06014.62
5.3.270.0130.05714.72
5.3.260.0130.05714.59
5.3.250.0270.06014.70
5.3.240.0130.05714.70
5.3.230.0330.04314.60
5.3.220.0270.04314.57
5.3.210.0270.05314.58
5.3.200.0130.05314.75
5.3.190.0100.05714.57
5.3.180.0230.06314.57
5.3.170.0170.05314.66
5.3.160.0100.06014.65
5.3.150.0230.04714.76
5.3.140.0270.05314.70
5.3.130.0230.06314.57
5.3.120.0170.05714.59
5.3.110.0130.06014.55
5.3.100.0230.04714.00
5.3.90.0200.05014.13
5.3.80.0170.05014.10
5.3.70.0200.05014.04
5.3.60.0170.05314.15
5.3.50.0230.05013.97
5.3.40.0130.06014.16
5.3.30.0230.04714.00
5.3.20.0170.05013.89
5.3.10.0230.05013.86
5.3.00.0130.05313.64
5.2.170.0130.04711.17
5.2.160.0170.04311.22
5.2.150.0130.04311.34
5.2.140.0200.05711.18
5.2.130.0200.04711.06
5.2.120.0200.05011.18
5.2.110.0170.05311.11
5.2.100.0270.04311.15
5.2.90.0130.04311.21
5.2.80.0130.04311.10
5.2.70.0170.04011.19
5.2.60.0170.04011.06
5.2.50.0100.04711.21
5.2.40.0170.04011.09
5.2.30.0070.04710.97
5.2.20.0270.03310.99
5.2.10.0170.03710.91
5.2.00.0230.03310.72
5.1.60.0170.03310.09
5.1.50.0070.04010.17
5.1.40.0130.0339.99
5.1.30.0130.03310.41
5.1.20.0000.04710.36
5.1.10.0130.03710.17
5.1.00.0200.03010.17
5.0.50.0170.0208.61
5.0.40.0030.0338.59
5.0.30.0030.0478.32
5.0.20.0130.0208.23
5.0.10.0070.0278.34
5.0.00.0070.0438.17
4.4.90.0070.0275.89
4.4.80.0070.0205.96
4.4.70.0070.0205.91
4.4.60.0070.0205.91
4.4.50.0100.0176.00
4.4.40.0070.0335.93
4.4.30.0030.0235.87
4.4.20.0030.0235.94
4.4.10.0030.0236.04
4.4.00.0030.0405.93
4.3.110.0070.0235.84
4.3.100.0070.0235.80
4.3.90.0170.0135.88
4.3.80.0070.0405.80
4.3.70.0030.0235.80
4.3.60.0070.0205.77
4.3.50.0000.0305.88
4.3.40.0130.0335.84
4.3.30.0030.0234.57
4.3.20.0100.0174.63
4.3.10.0000.0274.52
4.3.00.0130.0206.81

preferences:
47.99 ms | 400 KiB | 5 Q