2010/10/15 Andrei Pelinescu-Onciul <and...@iptel.org>: > Because "==" works only with arguments of the same type, 0 it's > autoconverted to "0". The alternative would be to log an error. > > Here are the rules for ==: > /* if left is string, eval left & right as string and use string diff. > * if left is int eval as int using int diff > * if left is undef, look at right and convert to right type > */
Hi, IMHO it's important not to "imitate" unexpected comparissions as they occur in the "great" PHP language: http://www.otton.org/2008/08/06/stupid-php-tricks-true-false-comparison/ -- Iñaki Baz Castillo <i...@aliax.net> _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users