Skip to content
A library for invoking PHP callables using positional and named arguments.
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.
src
test
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
composer.json
composer.lock
phpunit.xml

README.md

Evoke

Build Status Code Coverage Latest Version

Evoke is a small PHP library for invoking callables using positional and named parameters, a little like Python's *args, **kwargs syntax.

composer require icecave/evoke

Example

use Icecave\Evoke\Invoker;

$invoker = new Invoker;

$func = function ($a, $b, $c = 30, $d) {
    return array($a, $b, $c, $d);
};

$positionalArguments = array(10, 20);
$keywordArguments = array('d' => '40');

$result = $invoker->invoke($func, $positionalArguments, $keywordArguments);

assert($result === array(10, 20, 30, 40));
You can’t perform that action at this time.