Sebastian Krebs pointed out you can get the filename minus extension like this…

basename(__FILE__, '.php');

example: this is executed in filename.php -> you get: filename

admin