if ($i > 1 ) { if ($a = function_that_may_fail()) { $i++; } else { $i = 1; } }