Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/kakawait/Jumper

PHP remote closure executor
https://github.com/kakawait/Jumper

Last synced: 18 days ago
JSON representation

PHP remote closure executor

Lists

README

        

# Jumper

[![Build Status](https://travis-ci.org/kakawait/Jumper.png?branch=master)](https://travis-ci.org/kakawait/Jumper) [![Code Coverage](https://scrutinizer-ci.com/g/kakawait/Jumper/badges/coverage.png?s=db0c7d6bda59f6b8a1f48a8198bac300990deab0)](https://scrutinizer-ci.com/g/kakawait/Jumper/) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/kakawait/Jumper/badges/quality-score.png?s=1f25ddb000cb0e432fd247deb4167531b0628389)](https://scrutinizer-ci.com/g/kakawait/Jumper/) [![Dependency Status](https://www.versioneye.com/user/projects/5312482bec13759c230000da/badge.png)](https://www.versioneye.com/user/projects/5312482bec13759c230000da)

Allow you to execute PHP Closure in other distant computer via SSH and without client/server setup.

Source computer dependency: PHP >= 5.3 (so might work on windows but untested)

Target computer dependencies: PHP >= 5.3, SSHd

```php
'127.0.0.1'));

$executor = new \Jumper\Executor($communicator, new Jumper\Stringifier\Native());

$array = array(2, 1, 4, 3);
$rsortedArray = $executor->run(
function() use ($array) {
rsort($array);
return $array;
}
);

var_dump($rsortedArray);
// should print
/*
array(4) {
[0]=>
int(4)
[1]=>
int(3)
[2]=>
int(2)
[3]=>
int(1)
}
*/
```