3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function doSomething(string $value) : string { try { $value = 5 % 0; } finally { $value .= "Finally: " . $value; } return $value; } echo doSomething("Hello");
based on ILPvo
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/Eeqfc:6 Stack trace: #0 /in/Eeqfc(13): doSomething('Hello') #1 {main} thrown in /in/Eeqfc on line 6
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/Eeqfc on line 3
Process exited with code 255.