Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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));

About

A library for invoking PHP callables using positional and named arguments.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages