Introduction: This is a detailed page for learning equality among 0, '', null, false, true, flase, treu, and array () in PHP. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 341541 'rolling = 'no'>
"Null"Means"Nothing". The VaR has not been initialized.
"False"Means"Not true in a Boolean Context". Used to explicitely show you are dealing with logical issues.
0IsInt. Nothing to do with the rest above, used for mathematics.
Now, what is tricky, it's that in dynamic versions like PHP,All of them have a value in a Boolean Context, Which is "false ".
If you test it with "=", it's testing the Boolean value, so you will get duplicate ity. if you test it with "=", it will test the type, and you will get inequality.
// Compare the value ''null 0 false True False true arrau ()
// Equal judgment
// ''= NULL = 0 = false (equal)
// Array () = 0 = NULL = false (equal)
// Array () <> ''(not equal)
// Constant level judgment
// None of the two numbers is constant. // var_dump (false = false); // bool (true)
// Var_dump (false = false); // bool (true)
// Var_dump (true = true); // bool (true)
// Var_dump (true = true); // bool (true) // var_dump (''= NULL); // bool (true)
// Var_dump (''= NULL); // bool (false)
// Var_dump (''= 0); // bool (true)
// Var_dump (''= 0); // bool (false)
// Var_dump (''= false); // bool (true)
// Var_dump (''= false); // bool (false)
// Var_dump (''= true); // bool (false)
// Var_dump (''= true); // bool (false) // var_dump (null = 0); // bool (true)
// Var_dump (null = 0); // bool (false)
// Var_dump (null = false); // bool (true)
// Var_dump (null = false); // bool (false)
// Var_dump (null = true); // bool (false)
// Var_dump (null = true); // bool (false) // var_dump (0 = false); // bool (true)
// Var_dump (0 = false); // bool (false)
// Var_dump (0 = true); // bool (false)
// Var_dump (0 = true); // bool (false) // some true judgments
// Var_dump ('1' = true); // bool (true)
// Var_dump ('1' = true); // bool (false)
// Var_dump (1 = true); // bool (true)
// Var_dump (1 = true); // bool (false)
// Var_dump (Array () = true); // bool (false)
// Var_dump (Array () === true); // bool (false) // array () Comparison
// Var_dump (Array () = ''); // bool (false)
// Var_dump (Array () = ''); // bool (false)
// Var_dump (Array () = NULL); // bool (true)
// Var_dump (Array () === null); // bool (false)
// Var_dump (Array () = 0); // bool (false)
// Var_dump (Array () = 0); // bool (false)
// Var_dump (Array () = false); // bool (true)
// Var_dump (Array () = false); // bool (false)
// Var_dump (Array () = true); // bool (false)
// Var_dump (Array () = true); // bool (false) // constant comparison
// Var_dump (0 = '0'); // bool (false)
// Var_dump (0 = 00); // bool (true)
// Var_dump (00 === intval ('0'); // bool (true)
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/341541.html pageno: 6.