I've been reading some code and tgutorials for php, and I'm curious that people use === often in if statements and such. Is this different from == or is it some other kind of comparison operator?

    Check out Comparison Operators in the PHP Manual. $a==$b means variables are equivalent. $a===$b means variables are equivalent and of the same type (both booleans for example.)

      In PHP, many functions return FALSE depending on certain conditions (for example, strpos() returns FALSE if a "needle" isn't found in a string). BUT, with the "==" operator, 0 is considered as FALSE, but with "===", 0 is not FALSE.

      So...

      0==FALSE : true
      0===FALSE : false

        Write a Reply...