PHPackages                             arwg/env-knife - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. arwg/env-knife

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

arwg/env-knife
==============

A library for extracting and validating env-functions such as env(), config() on sources.

v0.0.4(5y ago)29MITPHPPHP &gt;=7.2

Since Feb 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Andrew-Kang-G/env-knife)[ Packagist](https://packagist.org/packages/arwg/env-knife)[ Docs](https://github.com/arwg/env-knife)[ RSS](/packages/arwg-env-knife/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (5)Used By (0)

Env-Knife
=========

[](#env-knife)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8c92ab30ecd459773df43818e410e80ec4d7059bf1c7d306087ec40dd64db14a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617277672f656e762d6b6e6966652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arwg/env-knife)

Overview
--------

[](#overview)

A library for extracting and validating env-functions such as env(), config() on sources

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

[](#installation)

```
composer require arwg/env-knife
```

Usage
-----

[](#usage)

Simple to use. Input the name of the function used to load environment variables on source codes. The thing is that no key-value setup is required.

```
      $envKnife = new EnvKnife();

      // For the first parameter, you can set any function name you are using for loading environment variables.

      // Detect funcs such as env('URL'), env("APP_CRITICAL", 5)
      // !! Variable types are limited to 'string, numeric, boolean'
      $envKnife->parseResults('env', base_path(), ['app', 'bootstrap', 'config', 'routes']);

      // Detect when 'env('URL') returns null'
      $results = $envKnife->getEmptyResults();

      // Detect funcs such as config('abc'), config("ABC_CRITICAL", 5)
      // !! Variable types are limited to 'string, numeric, boolean'
      $envKnife->parseResults('config', base_path(), ['app', 'bootstrap', 'config']);

      $results = $envKnife->getEmptyResults();

      // Detect errors such as "undefined index 'c'" in config('abc')['v']['c'] in case that there is no 'c'.
      $results2 = $envKnife->getErrorResults();
```

### Changelog

[](#changelog)

[Changelog](CHANGELOG.md)

License
-------

[](#license)

[License File](LICENSE)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Every ~0 days

Total

4

Last Release

1903d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f30ec3b4c587d6b56ac7bccc3aad770fbf3f24d37caa3253e048ffab1c760458?d=identicon)[Andrew-Kang-G](/maintainers/Andrew-Kang-G)

---

Top Contributors

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

---

Tags

laravellaravel-frameworkvalidatorvalidationconfigparserenvextractor

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arwg-env-knife/health.svg)

```
[![Health](https://phpackages.com/badges/arwg-env-knife/health.svg)](https://phpackages.com/packages/arwg-env-knife)
```

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[seld/jsonlint

JSON Linter

1.3k217.8M205](/packages/seld-jsonlint)[opis/json-schema

Json Schema Validator for PHP

64236.9M186](/packages/opis-json-schema)[vlucas/valitron

Simple, elegant, stand-alone validation library with NO dependencies

1.6k4.4M128](/packages/vlucas-valitron)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)

PHPackages © 2026

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