From a33c3ccc63f388c81a75d0fec3893c9d0212286b Mon Sep 17 00:00:00 2001 From: Inhere Date: Thu, 2 Dec 2021 22:51:12 +0800 Subject: [PATCH] breaking: rename function env() to env_val() --- .github/workflows/php.yml | 2 +- src/func.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a3a05c9..8b96621 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.1, 7.2, 7.3, 7.4, 8.0] # + php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1] # # os: [ubuntu-latest, macOS-latest] # windows-latest, steps: diff --git a/src/func.php b/src/func.php index 3809b9e..5f46e2c 100644 --- a/src/func.php +++ b/src/func.php @@ -114,14 +114,14 @@ function eprints(...$vars): void } } -if (!function_exists('env')) { +if (!function_exists('env_val')) { /** * @param string $key * @param string $default * * @return string */ - function env(string $key, string $default = ''): string + function env_val(string $key, string $default = ''): string { return Toolkit\Stdlib\OS::getEnvStrVal($key, $default); }