Php Why array ()! = 0

Source: Internet
Author: User
Array () false0false & #039; & #039; false0 & #039; & #039; but the question is why array ()! 0 array ()! & #039; & #039; array () = false
0 = false
''= False
0 =''
But the problem arises.
Why?
Array ()! = 0
Array ()! =''

Reply content:

Array () = false
0 = false
''= False
0 =''
But the problem arises.
Why?
Array ()! = 0
Array ()! =''

From: http://php.net/manual/zh/types.comparisons.php

The comparison result is related to the internal mechanism of php. It doesn't matter if you cannot understand it now. Just remember it as a rule.

Array ()! = 0
Array ()! =''

Arrays cannot be directly compared with int or string types.

Who told you=And! =The two operators are passed. Both 1 and 2 are = true. Is 1 equal to 2?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.