3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array(); function foo() { try { switch ($data['item']['status']) { default: return [ 'status' => 'error', 'message' => 'unknown event' ]; } return ['status' => 'success']; } catch (\Exception $e)) { return [ 'status' => 'error', 'message' => $e->getMessage() ]; } }
Output for 5.6.30
Parse error: syntax error, unexpected ')', expecting '{' in /in/c5HMm on line 16
Process exited with code 255.