3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = "abc"; map($data); function map($data) { try { $x = $data['protocol_id']; } catch (Exception $e) { echo "Generic Exception caught: " . $e->getMessage(); return; } echo "No Exception!"; return; }
Output for 5.4.0 - 7.1.0
Warning: Illegal string offset 'protocol_id' in /in/S3rKX on line 7 No Exception!
Output for 5.0.0 - 5.3.29
No Exception!
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/S3rKX on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/S3rKX on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/S3rKX on line 6
Process exited with code 255.