3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $filename = "music.mp3"; // check if file input is manipulated if (substr($filename, -3) == 'mp3') : elseif (substr($filename, -3) != 'mp4') : elseif (substr($filename, -3) != 'pdf') : elseif (substr($filename, -3) != 'doc') : elseif (substr($filename, -3) != 'epub') : elseif (substr($filename, -3) != 'mobi') : elseif (substr($filename, -3) != 'zip') : else { echo "Exited!" }
based on 3S65T
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected '{', expecting ':' in /in/2VRnd on line 14
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected '{', expecting ':' in /in/2VRnd:14 Stack trace: #0 {main}
Process exited with code 255.