private function getExecutedCommand()
    {
        $pathDirs = explode(PATH_SEPARATOR, $_SERVER['PATH']);
        $executedCommand = $_SERVER['PHP_SELF'];
        $executedCommandDir = dirname($executedCommand);

        if (in_array($executedCommandDir, $pathDirs)) {
            $executedCommand = basename($executedCommand);
        }

        return $executedCommand;
    }
private function getExecutedCommand()
    {
        $pathDirs = explode(PATH_SEPARATOR, $_SERVER['PATH']);
        $executedCommand = $_SERVER['PHP_SELF'];
        $executedCommandDir = dirname($executedCommand);

        if (in_array($executedCommandDir, $pathDirs)) {
            $executedCommand = basename($executedCommand);
        }

        return $executedCommand;
    }
private function getExecutedCommand ( ) { $ pathDirs = explode ( PATH_SEPARATOR , $ _SERVER [ 'PATH' ] ) ; $ executedCommand = $ _SERVER [ 'PHP_SELF' ] ; $ executedCommandDir = dirname ( $ executedCommand ) ; if ( in_array ( $ executedCommandDir , $ pathDirs ) ) { $ executedCommand = basename ( $ executedCommand ) ; } return $ executedCommand ; }
Returns the executed command.

@return string The executed command
Returns the executed command .