A reference to the relevant questions, ask everyone to help answer questions! Thanks a lot

Source: Internet
Author: User
A question about quoting, ask everyone to help answer questions! Thank you








For more information, refer to: http://www.jb51.net/article/22508.htm

When I look at a piece of article about quoting,
The author says the result is 2,
I think the result is 3,
After the operation, the result is actually 1.
Beginner PHP, the reference to it is not very understanding Ah,,,,,,
------Solution--------------------
For the sake of description, change the name of the formal parameter
Function Demo (& $x, & $y) {
$x =& $y;





& $x is another form of representation of global $a
So
$x =& $y;
It is
Global $a;
$a =& $y;
I hope you can understand that.

The manual has: if a variable declared as global is assigned to a reference within a function, the reference is only visible inside the function.

I'm not going to say anything anymore.
  • 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.