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