3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $throw = false; function foo() { bar(); } function bar() { baz(); } function baz() { boom(); } function boom() { global $throw; if ($throw) { throw new RuntimeException(); } } try { foo(); } catch (RuntimeException $e) { echo $e->getLine(); }
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.20
Parse error: syntax error, unexpected '=', expecting ',' or ';' in /in/j6dHN on line 3
Process exited with code 255.

preferences:
181.15 ms | 1395 KiB | 56 Q