note 11546 added to set_time_limit

From: Date: Fri, 23 Feb 2001 22:48:32 +0000
Subject: note 11546 added to set_time_limit
Groups: php.notes 
Request: Send a blank email to php-notes+get-11508@lists.php.net to get a copy of this message
I've noticed that using this function doesn't seem to block things that make calls to services and wait for a response. Setting set_time_limit(2) and then making a call to gethostbyaddr(ip.that.does.not.resolve) just sits there until it times out. It would be -really- nice if there was a perl-esque type function like alarm() that lets you set timeouts for specific sections of code, rather than entire scripts. I'd have great use for a feature that would enable me to run non crucial pieces of code for a few seconds, and then give up and move on if it takes too long. http://www.php.net/manual/en/function.set-time-limit.php

« previous php.notes (#11508) next »