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!; endif;
based on 2VRnd
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /in/7XUTJ on line 15
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /in/7XUTJ:14 Stack trace: #0 {main}
Process exited with code 255.