PHPackages                             datingvip/utils - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. datingvip/utils

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

datingvip/utils
===============

Various utility classes

v1.0.0(12y ago)319LGPLv3PHPPHP &gt;=5.4.0

Since Apr 13Pushed 8y ago8 watchersCompare

[ Source](https://github.com/DatingVIP/utils)[ Packagist](https://packagist.org/packages/datingvip/utils)[ Docs](https://github.com/DatingVIP/utils)[ RSS](/packages/datingvip-utils/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

utils
=====

[](#utils)

Various utilitiy classes

Env
===

[](#env)

Yet another environment utility class. Once it is setup with map of environment names to (array of) regular expression(s) to compare server HTTP host to, it provides a couple of methods to check where are we executing code. Environments can tagged as `debug`.

With no setup provided `production` environment is considered default, and `development` is tagged as `debug`.

It is considered that HTTP host belongs to a single environment, and setup ordering defines precedence if a host name matches multiple regular expressions.

Class also provides methods to check if we are running in CLI or Web. HTTPS checker is available as well.

```
require_once 'vendor/autoload.php';

use DatingVIP\utils\Env;

Env::setup ([
	'development' => ['/\.dev$/', '/\.test$/'], // just to display multiple regexes
	'staging' => '/^dev-/',
	'scary' => '/^hitchcock/',
	'production' => '/\.com$/',
]);

var_dump (Env::isDevelopment ('www.mysite.dev'));
var_dump (Env::isStaging ('dev-www.mysite.com'));
var_dump (Env::isScary ('hitchcock.mysite.com')); // not production, precedence
var_dump (Env::isProduction ('www.mysite.com'));

if (Env::debug ())
{
	// i can haz debug!
}

if (Env::isHTTPS ())
{
	// much secure
}

if (Env::isCLI ())
{
	// type type type
}
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4462d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/725986?v=4)[Boris Momčilović](/maintainers/kornrunner)[@kornrunner](https://github.com/kornrunner)

---

Top Contributors

[![kornrunner](https://avatars.githubusercontent.com/u/725986?v=4)](https://github.com/kornrunner "kornrunner (4 commits)")

---

Tags

environmentenv

### Embed Badge

![Health badge](/badges/datingvip-utils/health.svg)

```
[![Health](https://phpackages.com/badges/datingvip-utils/health.svg)](https://phpackages.com/packages/datingvip-utils)
```

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k640.2M6.1k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k243.3M2.7k](/packages/symfony-dotenv)[imliam/laravel-env-set-command

Set a .env file variable from the command line

119359.7k10](/packages/imliam-laravel-env-set-command)[msztorc/laravel-env

Laravel env helper commands

7858.2k](/packages/msztorc-laravel-env)[cekurte/environment

A library to get the values from environment variables and process to php data types

5887.0k8](/packages/cekurte-environment)[mirazmac/dotenvwriter

A PHP library to write values to .env (DotEnv) files

21154.0k11](/packages/mirazmac-dotenvwriter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
