intersection

php switch library

MIT License

Downloads
58
Stars
1
Committers
1

Citrus Intersection

php switch library

Install

composer require citrus-framework/intersection

USAGE

$value = 'admin';
$result = Intersection::fetch($value, [
    'user' => function () {
        return 'John';
    },
    'admin' => function () {
        return 'Alice';
    },
    'owner' => 'Michael',
], true);

// $result: 'Alice'