Priority-php Tutorial

Source: Internet
Author: User
The priority problem is encountered in the morning,
The above Auto-increment can be understood, that is, the first auto-increment, then the value assignment, and finally the value is 4 + 4 + 1. how does the result below be 8? The auto-increment priority should be greater than the plus sign.


Reply to discussion (solution)

For echo 1 + $ I ++ $ I;
Since the second operator is equal to the first operator
Therefore, 1 + $ I is the first to be completed, and the subsequent changes to $ I do not affect the previous changes.

For echo $ I ++ $ I + 1
It is true that the priority of ++ is higher than that of ++, so that the change of ++ $ I affects the previous $ I
Note the differences between ++ $ I and $ I ++.

The priority ratio of the + number is higher than that of the + + number. it is recommended that you take a look at the priority information. just exercise more.

The priority ratio of the + number is higher than that of the + + number. it is recommended that you take a look at the priority information. just exercise more.


Well, I have pasted all the priority pictures there. why is it still ++?
Priority

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.