[SR-Dev] if condition syntax

Juha Heinanen jh at tutpro.com
Wed Apr 22 09:54:25 CEST 2009


according to wiki page, sip-router has improved while and switch syntax,
but how about if condition syntax?

can i write, for example,

if (script_function() == 2) ...

of do i still need to do

script_function();
if ($retcode == 2) ...

by the way, i didn't quite understand the case example (first case
expression):

switch($var(x)){
        case / "^[abc]" :

what is the meaning of /?

-- juha



More information about the sr-dev mailing list