= 2) { $firstChar = $value[0]; $lastChar = $value[$length - 1]; if (($firstChar === '"' && $lastChar === '"') || ($firstChar === "'" && $lastChar === "'")) { $value = substr($value, 1, -1); } } $values[$name] = $value; } return $values; } function og_env(string $name, ?string $default = null): ?string { $value = getenv($name); if ($value !== false && $value !== '') { return $value; } static $envCache = null; if ($envCache === null) { $envPath = og_find_pingpong_env_path(); if ($envPath && is_file($envPath)) { $envCache = og_parse_env_file($envPath); } else { $envCache = []; } } if (array_key_exists($name, $envCache) && $envCache[$name] !== '') { return (string) $envCache[$name]; } return $default; }