Codice PHP:
function nomeFile($file$est true) {
   return (
$est || false === $punto strrposbasename$file ), '.' ))
       ? 
basename$file ) : substrbasename$file ), 0$punto );
}

$file $_SERVER['PHP_SELF'];
echo 
nomeFile($file,false