3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { $integerOrString = 1; $fooOrBarException = null; return 1; } catch (\FooException $e) { $integerOrString = 2; $fooOrBarException = $e; throw $e; } catch (\BarException $e) { $integerOrString = 'foo'; $fooOrBarException = $e; return $e; } finally { var_dump($integerOrString); }
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.8
int(1)