code: private static function includeConfigurationFile()
      {
          static $included = false;
  
          if ($included) {
              // The configuration file already included
              return;
          }
  
          $file = __DIR__.'/config.php';
  
          if (!file_exists($file)) {
              print sprintf(
                  'The configuration file "%s" was not found.%sPlease copy %s/config.php.dist to %s/config.php and modify new file for set own parameters.%s',
                  $file,
                  PHP_EOL,
                  __DIR__,
                  __DIR__,
                  PHP_EOL
              );
  
              exit(1);
          }
  
          $included = true;
          include_once $file;
      }
docs: Include configuration file with constants