PHPackages                             mareg/either - 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. mareg/either

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

mareg/either
============

0.2.4(9y ago)018.3k↓47.3%2PHP

Since Mar 1Pushed 9y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (2)

Either
======

[](#either)

[![Build Status](https://camo.githubusercontent.com/29824a461da33782f9e96d21bf5fb099dd0297cd255975fa4b7e71d9f9c4e328/68747470733a2f2f7472617669732d63692e6f72672f4a6f736570684d6f6e697a2f7068702d6569746865722e706e673f6272616e63683d6d6173746572)](undefined)

A strongly typed composable alternative to exceptions and functions that return error codes or sane values.

The convention is that `Left` is representative of an error value and `Right`is representative of a success value.

```
