PHP code example of kakawait / jumper

1. Go to this page and download the library: Download kakawait/jumper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kakawait / jumper example snippets




entication = new \Jumper\Communicator\Authentication\Rsa('root', $_SERVER['HOME'] . '/.ssh/id_rsa');
$communicator = new \Jumper\Communicator\Ssh($authentication, array('host' => '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)
}
*/