Does Kamailio use lazy evaluation in if expressions?
Like
if ($var(a) == 2 && $var(b) ==3) { ... }
then $var(b) == 3 is only evaluated if $var(a) == 2 is true
On 9/16/11 3:40 PM, Klaus Darilion wrote:
IIRC (there was a similar thread years ago): yes
this is true indeed -- just wanted to add that the other logical operators don't evaluate right side of the expression if the overall result is known from the left side, for example, if left side is true in an OR expression, the right side is not evaluated anymore.
Cheers, Daniel
On 16.09.2011 13:20, Morten Isaksen wrote:
Does Kamailio use lazy evaluation in if expressions?
Like
if ($var(a) == 2&& $var(b) ==3) { ... }
then $var(b) == 3 is only evaluated if $var(a) == 2 is true