I tried to do the following (which did not work):
class basename(__FILE__, '.php')
You can use basename() and $_SERVER['PHP_SELF'] to get current page file name that's what i understood from your question
basename()
$_SERVER['PHP_SELF']
php file
$filename = basename($_SERVER['PHP_SELF']);
then compare the class with variable
No, you must specify the class name.
http://php.net/manual/en/language.oop5.basic.php
You can use
basename()
and$_SERVER['PHP_SELF']
to get current page file name that's what i understood from your questionphp file
then compare the class with variable