3v4l.org

run code in 500+ PHP versions simultaneously
<?php function main() : iterable { return []; } function main2() : iterable { yield 'Hello'; yield 'World'; return []; } foreach (main() as $line) { var_dump($line); } foreach (main2() as $line) { var_dump($line); }

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.5.90.0120.00716.75
8.5.80.0040.00516.68
8.5.70.0120.00618.37
8.5.60.0140.00416.86
8.5.50.0070.01016.52
8.5.30.0120.00819.64
8.5.20.0100.00720.15
8.5.10.0100.00816.36
8.5.00.0130.00919.90
8.4.240.0040.00519.46
8.4.230.0180.00919.48
8.4.220.0120.00419.29
8.4.210.0120.00719.46
8.4.180.0150.00822.07
8.4.170.0110.01121.81
8.4.160.0060.00621.87
8.4.150.0090.00316.87
8.4.140.0120.01117.37
8.4.130.0030.00618.66
8.4.120.0110.00718.80
8.4.110.0100.00918.02
8.4.100.0110.01017.77
8.4.90.0160.00420.53
8.4.80.0070.00318.79
8.4.70.0060.00318.77
8.4.60.0150.00620.50
8.4.50.0110.01118.69
8.4.40.0060.00317.70
8.4.30.0150.00320.55
8.4.20.0060.01019.27
8.4.10.0040.00419.24
8.3.330.0080.00218.51
8.3.320.0110.00818.44
8.3.310.0120.00918.44
8.3.300.0070.01318.30
8.3.290.0090.01120.82
8.3.280.0120.00718.39
8.3.270.0150.01216.40
8.3.260.0110.00816.55
8.3.250.0140.00616.32
8.3.240.0070.00216.71
8.3.230.0050.00316.66
8.3.220.0100.00919.02
8.3.210.0060.00316.55
8.3.200.0100.01016.45
8.3.190.0020.00617.14
8.3.180.0120.00818.85
8.3.170.0100.00917.05
8.3.160.0070.01117.42
8.3.150.0140.00417.16
8.3.140.0070.01116.69
8.3.130.0000.01518.46
8.3.120.0170.00320.50
8.3.110.0130.01022.58
8.3.100.0350.01222.58
8.3.90.0360.01122.58
8.3.80.0420.00822.58
8.3.70.0440.00322.58
8.3.60.0480.00422.58
8.3.50.0340.00822.58
8.3.40.0100.01022.58
8.3.30.0170.00422.58
8.3.20.0180.00422.58
8.3.10.0200.00322.58
8.3.00.0090.00422.58
8.2.320.0100.00618.12
8.2.310.0120.00918.16
8.2.300.0070.01222.09
8.2.290.0050.00416.68
8.2.280.0130.00620.13
8.2.270.0080.01118.25
8.2.260.0000.00816.44
8.2.250.0040.01116.64
8.2.240.0000.00817.17
8.2.230.0180.00022.58
8.2.220.0190.00022.58
8.2.210.0120.00622.58
8.2.200.0200.00622.58
8.2.190.0260.01122.58
8.2.180.0110.00822.58
8.2.170.0310.00422.58
8.2.160.0220.00022.58
8.2.150.0220.00322.58
8.2.140.0210.00522.58
8.2.130.0280.00422.58
8.2.120.0280.00822.58
8.2.110.0330.00722.58
8.2.100.0320.00722.58
8.2.90.0360.00422.58
8.2.80.0330.00322.58
8.2.70.0280.00722.58
8.2.60.0280.00822.58
8.2.50.0370.00322.58
8.2.40.0270.01522.58
8.2.30.0280.00822.58
8.2.20.0280.00922.58
8.2.10.0210.01822.58
8.2.00.0260.01622.58
8.1.340.0120.00820.18
8.1.330.0110.00816.36
8.1.320.0140.00517.75
8.1.310.0080.00616.66
8.1.300.0060.00318.70
8.1.290.0390.00422.58
8.1.280.0370.00322.58
8.1.270.0420.00622.58
8.1.260.0370.00722.58
8.1.250.0440.00322.58
8.1.240.0300.01022.58
8.1.230.0240.01222.58
8.1.220.0260.01322.58
8.1.210.0360.00322.58
8.1.200.0260.01522.58
8.1.190.0280.01122.58
8.1.180.0330.00722.58
8.1.170.0320.00722.58
8.1.160.0360.00022.58
8.1.150.0270.01022.58
8.1.140.0120.00622.58
8.1.130.0320.00622.58
8.1.120.0260.01322.58
8.1.110.0320.00622.58
8.1.100.0330.00822.58
8.1.90.0380.00322.58
8.1.80.0270.01122.58
8.1.70.0360.00322.58
8.1.60.0260.01622.58
8.1.50.0330.01022.58
8.1.40.0380.00722.58
8.1.30.0330.00322.58
8.1.20.0310.00322.58
8.1.10.0340.00922.58
8.1.00.0260.01622.58
7.2.240.0190.00816.00
4.3.110.0050.00013.11

preferences:
51.72 ms | 1034 KiB | 5 Q