How to get the name of a file executed php code example Example: php current file name basename(__FILE__, '.php');