PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Arnel Labarda   PHP Retry Library   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example usage
Class: PHP Retry Library
Keep calling a function until it meets a condition
Author: By
Last change:
Date: 6 years ago
Size: 211 bytes
 

Contents

Class file image Download
<?php

// will retry 5 times by default at 1 minute interval
$retry_command = new RetryCall;

$retry_command->retry(function() {
   
$elephant = 1;
   
$ant = 0;

    return
$ant >= $elephant;
});