3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function decorate(callable $fn, callable $decorator) { $gen = $decorator(); } function foo() { throw new Exception("Error!"); } function catch_all_exceptions() { return function() { try { (yield ["foo" => "bar"]); } catch (\Exception $e) { echo "Caught Exception: $e\n"; } }; }
Output for 5.5.24 - 7.1.0
Output for 5.3.2 - 5.4.45
Parse error: syntax error, unexpected '[' in /in/Zia8O on line 18
Process exited with code 255.
Output for 5.2.13 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/Zia8O on line 16
Process exited with code 255.