3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $name = 'CFE 2012 DECL INITIAL.pdf'; $extension = 'pdf'; $name = substr($name, 0, (strlen($name)-strlen($extension)-1)); var_dump($name);
based on X9bOD
Output for 4.3.0 - 7.2.0
string(21) "CFE 2012 DECL INITIAL"