What does this PHP statement mean? Solution-php Tutorial

Source: Internet
Author: User
What does PHP mean! $ Status & amp; $ status $ pm [msgtoid] & amp; $ pm [new]; what does the PHP statement mean? ------ solution --------------------! $ Status & amp; $ status $ pm [msgtoid] & amp; what does the PHP statement mean?
! $ Status & $ status = $ pm ['msgtoid'] & $ pm ['new'];

What does PHP mean?

------ Solution --------------------
! $ Status & $ status = $ pm ['msgtoid'] & $ pm ['new'];

If! $ Status = 1 (that is, $ status = 0)
And $ status = $ pm ['msgtoid'] (the value of $ status after the assignment is not 0)
And $ pm ['new'] is not 0

So .....
------ Solution --------------------
! $ Status & $ status = $ pm ['msgtoid'] & $ pm ['new'];
! $ Status returns a BOOL value, indicating that the value is not $ status
The subsequent value assignment is performed only when the value of not $ status is true.
$ Status = $ pm ['msgtoid'] & $ pm ['new'];
$ Pm ['msgtoid'] & $ pm ['new'] returns BOOL values.
True is returned only when $ pm ['msgtoid'] and $ pm ['new'] are not empty, not 0, not false, or NULL.
------ Solution --------------------
! $ Status & $ status = $ pm ['msgtoid'] & $ pm ['new'];
Operation sequence:
(! $ Status) & ($ status = $ pm ['msgtoid'] & $ pm ['new']);
Equal (! $ Status) & $ pm ['msgtoid'] & $ pm ['new'];
In this case, the calculation result of $ pm ['msgtoid'] & $ pm ['new'] is assigned to $ status, which may be used by the following program or may cause a problem.

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.