PHP code example of honzamac / conditional-retry
1. Go to this page and download the library: Download honzamac/conditional-retry 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/ */
honzamac / conditional-retry example snippets
yConditional(function () {
$result = $this->sms->send('+420800100200', 'Help, I\'m drowning!');
return $result;
}, function ($returnValue) {
return !$returnValue;
}, 3);
yConditional(
function () {
// do stuff
throw new \RuntimeException();
},
function ($value, $exception) { return $exception instanceof \RuntimeException;},
3
);