PHPackages                             adamquaile/php-global-abstraction - 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. adamquaile/php-global-abstraction

ActiveLibrary

adamquaile/php-global-abstraction
=================================

Wrapper around features of PHP which affect global scope

v2.0.0(11y ago)01081MITPHPPHP &gt;= 5.3

Since Jan 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/adamquaile/php-global-abstraction)[ Packagist](https://packagist.org/packages/adamquaile/php-global-abstraction)[ RSS](/packages/adamquaile-php-global-abstraction/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (12)Used By (1)

Global scope abstraction for PHP
================================

[](#global-scope-abstraction-for-php)

This library provides object-oriented wrappers around some of the features of PHP affecting global scope.

The currently implemented features are:

- Constants
- Functions
- Echo / Print

[Global state is evil](http://programmers.stackexchange.com/questions/148108/why-is-global-state-so-evil). Avoid it wherever possible. Do not think this library makes it okay.

This library has two main use cases:

- when you're working in an environment where it's unavoidable, and you still want code you write as testable as possible
- while you're refactoring your code to get out of this mess

Usage
-----

[](#usage)

Install it with composer, `adamquaile/php-global-abstraction`.

**Constants**

```
