PHP code example of furiosojack / linked-callbacks
1. Go to this page and download the library: Download furiosojack/linked-callbacks 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/ */
furiosojack / linked-callbacks example snippets
$listCallbacks = new FuriosoJack\LinkedCallbacks\ListDoubleCallbacks();
$listCallbacks->insertFirst(function($node){
return "hola primer mundo";
},10);
$message = "mensaje a cifrar";
$listCallbacks->insertFirst(function($node) use($message){
return base64_encode($message);
},null);
$firstNode = $listCallbacks->firstNode();
for($x = $firstNode; $x != null; $x = $x->getNodeNext()){
echo $x->run();
}
//el resultado sera el siguiente
hola primer mundo
j7r'j