3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = function() { try { yield 1; } finally { throw new Exception(); } }; $b = function() { yield 1; }; echo "starting " . phpversion() . "\n"; try { foreach ($a() as $x) { foreach ($b() as $y) { return true; } } } catch (Exception $e) { echo "caught exception.\n"; } echo "exit.\n";
Output for 7.3.1
starting 7.3.1 caught exception. exit.
Output for 7.3.0
starting 7.3.0 caught exception. exit.
Output for 7.2.13
starting 7.2.13 caught exception. exit.
Output for 7.2.12
starting 7.2.12 caught exception. exit.
Output for 7.2.11
starting 7.2.11 caught exception. exit.
Output for 7.2.10
starting 7.2.10 caught exception. exit.
Output for 7.2.9
starting 7.2.9 caught exception. exit.
Output for 7.2.8
starting 7.2.8 caught exception. exit.
Output for 7.2.7
starting 7.2.7 caught exception. exit.
Output for 7.2.6
starting 7.2.6 caught exception. exit.
Output for 7.2.5
starting 7.2.5 caught exception. exit.
Output for 7.2.4
starting 7.2.4 caught exception. exit.
Output for 7.2.3
starting 7.2.3 caught exception. exit.
Output for 7.2.2
starting 7.2.2 caught exception. exit.
Output for 7.2.1
starting 7.2.1 caught exception. exit.
Output for 7.2.0
starting 7.2.0 caught exception. exit.
Output for 7.1.25
starting 7.1.25 caught exception. exit.
Output for 7.1.7
starting 7.1.7 caught exception. exit.
Output for 7.1.6
starting 7.1.6 caught exception. exit.
Output for 7.1.5
starting 7.1.5 caught exception. exit.
Output for 7.1.0
starting 7.1.0 caught exception. exit.
Output for 7.0.20
starting 7.0.20 caught exception. exit.
Output for 7.0.6
starting 7.0.6 caught exception. exit.
Output for 7.0.5
starting 7.0.5 caught exception. exit.
Output for 7.0.4
starting 7.0.4 caught exception. exit.
Output for 7.0.3
starting 7.0.3 caught exception. exit.
Output for 7.0.2
starting 7.0.2 caught exception. exit.
Output for 7.0.1
starting 7.0.1 caught exception. exit.
Output for 7.0.0
starting 7.0.0 caught exception. exit.
Output for 5.6.28
starting 5.6.28
Process exited with code 139.
Output for 5.6.21
starting 5.6.21
Process exited with code 139.
Output for 5.6.20
starting 5.6.20
Process exited with code 139.
Output for 5.6.19
starting 5.6.19
Process exited with code 139.
Output for 5.6.18
starting 5.6.18
Process exited with code 139.
Output for 5.6.17
starting 5.6.17
Process exited with code 139.
Output for 5.6.16
starting 5.6.16
Process exited with code 139.
Output for 5.6.15
starting 5.6.15
Process exited with code 139.
Output for 5.6.14
starting 5.6.14
Process exited with code 139.
Output for 5.6.13
starting 5.6.13
Process exited with code 139.
Output for 5.6.12
starting 5.6.12
Process exited with code 139.
Output for 5.6.11
starting 5.6.11
Process exited with code 139.
Output for 5.6.10
starting 5.6.10
Process exited with code 139.
Output for 5.6.9
starting 5.6.9
Process exited with code 139.
Output for 5.6.8
starting 5.6.8
Process exited with code 139.
Output for 5.5.35
starting 5.5.35
Process exited with code 139.
Output for 5.5.34
starting 5.5.34
Process exited with code 139.
Output for 5.5.33
starting 5.5.33
Process exited with code 139.
Output for 5.5.32
starting 5.5.32
Process exited with code 139.
Output for 5.5.31
starting 5.5.31
Process exited with code 139.
Output for 5.5.30
starting 5.5.30
Process exited with code 139.
Output for 5.5.29
starting 5.5.29
Process exited with code 139.
Output for 5.5.28
starting 5.5.28
Process exited with code 139.
Output for 5.5.27
starting 5.5.27
Process exited with code 139.
Output for 5.5.26
starting 5.5.26
Process exited with code 139.
Output for 5.5.25
starting 5.5.25
Process exited with code 139.
Output for 5.5.24
starting 5.5.24
Process exited with code 139.

preferences:
60.16 ms | 401 KiB | 61 Q