PHPackages                             coercive/globals - 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. coercive/globals

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

coercive/globals
================

Coercive Globals Utility

1.1.2(5y ago)03.5kMITPHPPHP &gt;=7

Since Jul 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Coercive/Globals)[ Packagist](https://packagist.org/packages/coercive/globals)[ Docs](http://coercive.fr)[ RSS](/packages/coercive-globals/feed)WikiDiscussions master Synced today

READMEChangelog (8)DependenciesVersions (9)Used By (0)

Coercive Globals Utility
========================

[](#coercive-globals-utility)

GLOBALS allows you to easily manage your global variables in PHP by filtering the content automatically or specifically, with batch processing possible in case of array.

Get
---

[](#get)

```
composer require coercive/globals

```

Usage
-----

[](#usage)

```
use Coercive\Utility\Globals;

# LOAD
$oGlobals = new Globals;

# DEFAULT
$oGlobals->filter(true);
# You can turn off by setting 'false'

# SET VAR
$oGlobals->GET('name', 'value');

# GET VAR
$var = $oGlobals->GET('name');

# FOR EXAMPLE :
$_GET['array'] = ['email@email.email', 'not an email'];
$_GET['notInt'] = '01234';
$_GET['int'] = '14244';
$_GET['_int'] = '-14244';
$_GET['float'] = '142.24';
$_GET['_float'] = '+142.24';
$_GET['bool'] = 'false';
$_GET['_bool'] = true;
$_GET['quote'] = '&quot;';

# FILTER ALL
$var = $oGlobals->GET()->filterAll();

/**
      ["array"]
            [0]=> string(17) "email@email.email"
            [1]=> string(12) "not an email"
      ["notInt"]=> string(5) "01234"
      ["int"]=> int(14244)
      ["_int"]=> int(-14244)
      ["float"]=> float(142.24)
      ["_float"]=> float(142.24)
      ["bool"]=> bool(false)
      ["quote"]=> string(10) "&quot;"
*/

# FILTER ONE (including array of elements)
$var = $oGlobals->email()->GET('array');

/**
    ["array"]
        [0]=> string(17) "email@email.email"
        [1]=> bool(false)
*/
```

**FILTER**

```
->octal()->...
->int()->...
->float()->...
->bool()->...
->ip()->...
->ipv4()->...
->ipv6()->...
->callback()->...
->rArray()->...
->email()->...
->url()->...
->mac()->...
->string()->...
->stringFull()->...
->noFilter()->...

```

**NEW OPTION**

```
# You can now filter a variable (or a part of global for re-inject)
$Result = $oGlobals->autoFilterManualVar($YourVar);

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~208 days

Recently: every ~273 days

Total

8

Last Release

2160d ago

PHP version history (3 changes)1.0.0PHP &gt;=7.0

1.1PHP &gt;=7.1

1.1.2PHP &gt;=7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20288080?v=4)[Coercive](/maintainers/Coercive)[@Coercive](https://github.com/Coercive)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/coercive-globals/health.svg)

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

###  Alternatives

[fidum/nova-package-bundler-command

Improves Laravel Nova initial load speeds by combining all third party package assets into a single file.

2196.8k](/packages/fidum-nova-package-bundler-command)

PHPackages © 2026

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