3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { yield 'foo'; goo(); } function too() { yield 'too'; yield from goo(); } function hoo() { yield 'hoo'; yield goo(); } function goo() { yield 'goo'; } foreach(foo() as $a) { print $a.PHP_EOL;} // goo foreach(too() as $a) { print $a.PHP_EOL;} // too goo foreach(hoo() as $a) { print $a.PHP_EOL;} // hoo Uncaught Error: Object of class Generator // could not be converted to string ?>

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.60.0130.00417.03
8.5.50.0060.00116.84
8.5.30.0130.00518.19
8.5.20.0070.01120.36
8.5.10.0100.00816.49
8.5.00.0120.00920.25
8.4.210.0120.00921.59
8.4.180.0150.00819.67
8.4.170.0120.00922.03
8.4.160.0140.00921.86
8.4.150.0080.00616.93
8.4.140.0120.00817.89
8.4.130.0110.00917.91
8.4.120.0050.00420.66
8.4.110.0090.01122.46
8.4.100.0150.00717.92
8.4.90.0120.00917.88
8.4.80.0120.00918.63
8.4.70.0410.00917.50
8.4.60.0420.00817.92
8.4.50.0420.00617.86
8.4.40.0450.00517.57
8.4.30.0430.00917.74
8.4.20.0360.00517.41
8.4.10.0160.00717.75
8.3.300.0100.00920.77
8.3.290.0090.01120.68
8.3.280.0060.00318.51
8.3.270.0120.00916.98
8.3.260.0120.00816.80
8.3.250.0050.00819.02
8.3.240.0110.01016.59
8.3.230.0090.01116.70
8.3.220.0190.00618.95
8.3.210.0170.00416.77
8.3.200.0320.00816.77
8.3.190.0220.00816.88
8.3.180.0230.00516.77
8.3.170.0180.00516.77
8.3.160.0270.00616.77
8.3.150.0430.00916.77
8.3.140.0410.00616.77
8.3.130.0250.00516.79
8.3.120.0150.00416.77
8.3.110.0180.00216.77
8.3.100.0180.00516.77
8.3.90.0170.00516.77
8.3.80.0180.00516.77
8.3.70.0230.00516.81
8.3.60.0200.00316.77
8.3.50.0190.00516.77
8.3.40.0380.00917.14
8.3.30.0330.01017.52
8.3.20.0210.00617.79
8.3.10.0290.01117.57
8.3.00.0130.00917.76
8.2.300.0140.00720.45
8.2.290.0100.00920.34
8.2.280.0300.01216.77
8.2.270.0350.00716.77
8.2.260.0270.00516.77
8.2.250.0180.00216.77
8.2.240.0210.00516.80
8.2.230.0350.00816.77
8.2.220.0320.00816.77
8.2.210.0350.00816.77
8.2.200.0340.00916.77
8.2.190.0350.00916.77
8.2.180.0300.00916.77
8.2.170.0170.00317.79
8.2.160.0290.00517.73
8.2.150.0140.00517.74
8.2.140.0300.00817.55
8.2.130.0160.00417.60
8.2.120.0370.00617.41
8.2.110.0360.00917.70
8.2.100.0360.00717.26
8.2.90.0360.00917.60
8.2.80.0330.00617.28
8.2.70.0380.00717.32
8.2.60.0370.00717.54
8.2.50.0370.00617.39
8.2.40.0310.00917.31
8.2.30.0290.01017.45
8.2.20.0430.00617.34
8.2.10.0370.00517.23
8.2.00.0340.00717.54
8.1.340.0090.01020.13

preferences:
42.58 ms | 864 KiB | 5 Q