PHP Classes

File: src/helpers.php

Recommend this page to a friend!
  Classes of Mateo   Ollama Artificial Intelligence PHP Telegram Bot   src/helpers.php   Download  
File: src/helpers.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Ollama Artificial Intelligence PHP Telegram Bot
Telegram bot to interact with Ollama AI models
Author: By
Last change:
Date: 4 months ago
Size: 341 bytes
 

Contents

Class file image Download
<?php

namespace Mateodioev\OllamaBot;

/**
 * Get the value of an environment variable or return a default value.
 */
function env(string $key, $default = null): mixed
{
    return
$_ENV[$key] ?? $default;
}

/**
 * Get all the environment variables for the application.
 */
function allEvn(): array
{
    return [...
$_ENV, ...getenv()];
}