Is there a way for me to allot say - two seconds for a function to execute, and if it surpasses that amount of time, return a default value?
function foo() {
// call out to URL and get info...
// if this takes longer than 2 seconds, return $a
// else, return $b
}