PHPackages                             kimtooflex/envswitch - 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. kimtooflex/envswitch

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

kimtooflex/envswitch
====================

Code once, host anywhere, run everywhere

116PHP

Since Sep 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/KimTooFlex/envswitch)[ Packagist](https://packagist.org/packages/kimtooflex/envswitch)[ RSS](/packages/kimtooflex-envswitch/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

envswitch.php
=============

[](#envswitchphp)

Code once, host anywhere, run everywhere

**envswitch.php** is a fast &amp; flexible environment switching library for PHP 5.X+

- Define multiple production or development servers
- Callback compatibility
- No Server limits

Getting started
---------------

[](#getting-started)

1. PHP 5.x.x is required
2. Install envswitch using [Composer](#composer-installation) (recommended)

Composer Installation
---------------------

[](#composer-installation)

1. Get [Composer](http://getcomposer.org/)
2. Require Klein with `php composer.phar require kimtooflex/envswitch`
3. Add the following to your application's main PHP file: `use \envswitch\EnvSwitch;`

Example
-------

[](#example)

*Hello World* - Obligatory hello world example (one server)

```
