Protecting the user (devloper) from themselves ?
| From: | l0t3k | Date: | Fri, 10 Sep 2004 23:01:52 +0000 |
| Subject: | Protecting the user (devloper) from themselves ? | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-1301@lists.php.net to get a copy of this message | ||
as part of an extension i'm working on, im implementing support for an iCal
compliant RecurrenceRule class. to make it play nice in PHP5, i want to add
an iterator, to loop through all the occurrences specified by the rule. so
for instance
/* DTSTART ommitted, but supported */
$payday = new
RecurrenceRule("FREQ=MONTHLY;BYMONTHDAY=1,15;BYHOUR=12;COUNT=10;");
foreach($payday as $date) {
echo prettify($date) . '\n';
}
so far so good, right ? except the base calculation engine supports dates of
about 140742BC to 144683AD.
now imagine the rule
FREQ=SECONDLY
but i guess theres also nothing stopping someone from doing
while (0) {};
if i go ahead with this, is there a way from the iterator code to
periodically check for script timeout ?
l0t3k