PHPackages                             sebastian/environment - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. sebastian/environment

ActiveLibrary[Testing &amp; Quality](/categories/testing)

sebastian/environment
=====================

Provides functionality to handle HHVM/PHP environments

9.1.0(1mo ago)6.8k871.7M—7.5%37[3 issues](https://github.com/sebastianbergmann/environment/issues)[2 PRs](https://github.com/sebastianbergmann/environment/pulls)20BSD-3-ClausePHPPHP &gt;=8.4CI passing

Since Feb 18Pushed today4 watchersCompare

[ Source](https://github.com/sebastianbergmann/environment)[ Packagist](https://packagist.org/packages/sebastian/environment)[ Docs](https://github.com/sebastianbergmann/environment)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ Fund](https://liberapay.com/sebastianbergmann)[ RSS](/packages/sebastian-environment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (63)Used By (20)

[![Latest Stable Version](https://camo.githubusercontent.com/57e809b11b94c3e7959cfd5a1236eeb6596d9616cb60efdf7842c65298baf0d6/68747470733a2f2f706f7365722e707567782e6f72672f73656261737469616e2f656e7669726f6e6d656e742f76)](https://packagist.org/packages/sebastian/environment)[![CI Status](https://github.com/sebastianbergmann/environment/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/environment/actions)[![codecov](https://camo.githubusercontent.com/9a767d67f5be34c1d67fb312a09ec790a571bec905e8de550ae06385f1766e60/68747470733a2f2f636f6465636f762e696f2f67682f73656261737469616e626572676d616e6e2f656e7669726f6e6d656e742f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/sebastianbergmann/environment)

sebastian/environment
=====================

[](#sebastianenvironment)

This component provides functionality that helps writing PHP code that has runtime-specific (PHP / HHVM) execution paths.

Installation
------------

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require sebastian/environment

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev sebastian/environment

```

###  Health Score

84

—

ExcellentBetter than 100% of packages

Maintenance95

Actively maintained with recent releases

Popularity84

Widely adopted with strong download metrics

Community41

Growing community involvement

Maturity95

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 89.1% 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

Every ~73 days

Recently: every ~2 days

Total

61

Last Release

58d ago

Major Versions

7.2.0 → 8.0.02025-02-07

7.2.1 → 8.0.12025-05-21

6.1.x-dev → 7.2.x-dev2025-09-26

7.2.x-dev → 9.0.02026-02-06

8.0.4 → 9.0.12026-03-15

PHP version history (13 changes)1.0.0PHP &gt;=5.3.3

1.3.8PHP ^5.3.3 || ^7.0

2.0.0PHP ^5.6 || ^7.0

3.0.0PHP ^7.0

4.0.1PHP ^7.1

5.0.0PHP ^7.3

5.1.2PHP ^7.3 || ^8.0

5.1.3PHP &gt;=7.3

4.2.4PHP &gt;=7.1

6.0.0PHP &gt;=8.1

7.0.0PHP &gt;=8.2

8.0.0PHP &gt;=8.3

9.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (558 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (12 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (8 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (7 commits)")[![dingo-d](https://avatars.githubusercontent.com/u/8638515?v=4)](https://github.com/dingo-d "dingo-d (6 commits)")[![joanhey](https://avatars.githubusercontent.com/u/249085?v=4)](https://github.com/joanhey "joanhey (4 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (4 commits)")[![whatthejeff](https://avatars.githubusercontent.com/u/306525?v=4)](https://github.com/whatthejeff "whatthejeff (3 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (3 commits)")[![krakjoe](https://avatars.githubusercontent.com/u/2236138?v=4)](https://github.com/krakjoe "krakjoe (3 commits)")[![fredemmott](https://avatars.githubusercontent.com/u/360927?v=4)](https://github.com/fredemmott "fredemmott (2 commits)")[![rquadling](https://avatars.githubusercontent.com/u/12801?v=4)](https://github.com/rquadling "rquadling (2 commits)")[![rvanvelzen](https://avatars.githubusercontent.com/u/102603?v=4)](https://github.com/rvanvelzen "rvanvelzen (2 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (1 commits)")[![dkarlovi](https://avatars.githubusercontent.com/u/209225?v=4)](https://github.com/dkarlovi "dkarlovi (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![thrashzone13](https://avatars.githubusercontent.com/u/50789773?v=4)](https://github.com/thrashzone13 "thrashzone13 (1 commits)")[![tomzx](https://avatars.githubusercontent.com/u/188960?v=4)](https://github.com/tomzx "tomzx (1 commits)")[![ArnaudLier](https://avatars.githubusercontent.com/u/32982428?v=4)](https://github.com/ArnaudLier "ArnaudLier (1 commits)")

---

Tags

Xdebugenvironmenthhvm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sebastian-environment/health.svg)

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

###  Alternatives

[nette/tester

Nette Tester: enjoyable unit testing in PHP with code coverage reporter. 🍏🍏🍎🍏

4917.3M1.5k](/packages/nette-tester)[encodia/laravel-health-env-vars

Custom check for Spatie's Laravel Health - Ensure every .env variable you need has been set

20143.5k](/packages/encodia-laravel-health-env-vars)[derptest/phpmachinist

Testing object factory for PHP

3636.9k1](/packages/derptest-phpmachinist)[phpmachinist/phpmachinist

Testing object factory for PHP

3630.7k](/packages/phpmachinist-phpmachinist)[hackpack/hackunit

An xUnit testing framework for Hack

612.7k14](/packages/hackpack-hackunit)

PHPackages © 2026

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