PHP code example of crodas / memorandum
1. Go to this page and download the library: Download crodas/memorandum 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/ */
crodas / memorandum example snippets
$function = memo(function($file) {
sleep(10);
return 'cached ouptut:' . $file;
});
$result = $function(__DIR__);
$result = $function(__DIR__);
// The function would be called once, and the output
// will be remembered until a new file is added to __DIR__
// or another file is removed.