citrus-framework/intersection

v1.0.2 2020-06-03 19:02 UTC

This package is auto-updated.

Last update: 2024-05-20 13:53:20 UTC


README

php switch library

Install

composer require citrus-framework/intersection

USAGE

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

// $result: 'Alice'