Skip to content
Simple PHP monad library
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
tests
LICENSE
README.md
composer.json
example.php

README.md

maybe-monad

Simple Maybe monad library for PHP. Makes your life easier by making your code safer and by keeping your code stylish.

What is this library about

Graceful handling of null values.

Installation

Composer:

"require": {
    "pirminis/maybe-monad": "~1.2"
},
"autoload": {
    "files": ["vendor/pirminis/maybe-monad/lib/global.php"]
}

Examples

Dont be a jerk and check example.php, it is simple and easy to understand:

php example.php

Tests

Use phpunit in project folder:

phpunit tests

Bugs?

$how_much_I_care = \Maybe('that much'); echo $how_much_I_care->val('not that much');

You can’t perform that action at this time.