Remote PHP code execution

Event Listener: Skynet\EventListener\SkynetEventListenerEval

Skynet offers remote PHP code execution functionality. It's based on PHP's eval() function.
If you need to execute PHP code sended via request on remote cluster(s) just use:


Command takes one parameter: php with code source.


If you want to execute code below on another cluster and takes result:

<?php return 2+2; ?>

you need to do this like these:

@eval php:"return 2+2;";

or in Event Listener:

public function onRequest($context)
if($context == "beforeSend")
$code = 'return 2 + 2;';
$this->request->set('@eval', array('php' => $code));

Skynet will send request, remotely execute PHP code and returns output in response field:


In example above output will be:

@<<eval = 4
Full API Documentation is included in Skynet packages available on GitHub.