'', str_starts_with($rev, '0-') => substr($rev, 1), default => ".$rev" }; return "v$major$minor$rev"; } require __DIR__ . '/vendor/autoload.php'; require 'user-config.php'; Configuration::$pdoDSN = 'sqlite:' . implode(DIRECTORY_SEPARATOR, [__DIR__, 'data', DATABASE_NAME]); Configuration::$autoId = AutoId::Number; Data::ensureDb(); /** @var string The date the world wide web was created */ const WWW_EPOCH = '1993-04-30T00:00:00+00:00'; /** * Capitalize the first letter of the given string * * @param string $value The string to be capitalized * @return string The given string with the first letter capitalized */ function init_cap(string $value): string { return match (strlen($value)) { 0 => "", 1 => strtoupper($value), default => strtoupper(substr($value, 0, 1)) . substr($value, 1), }; }