No more textures, the printed results are directly written in the code, which is clearer than the textures. No more textures, the printed results are directly written in the code, which is clearer than the textures.
"; Echo $ x; // print the result as B echo"
"; Echo $ x; // print the result as c echo"
"; Echo $ x; // print the result as d echo"
"; Echo $ x; // print the result as a echo"
"; Echo $ a; // print the result as B echo"
"; Echo $ B; // print the result as c echo"
"; Echo $ c; // print the result as d echo"
";/** You cannot print $ d because the variable * // ** is referenced in the variable */$ m = 10; $ n = 20; $ y = & $ m; // y refers to the value of m, which means that y is the alias of m echo $ y; // print the result as 10 echo"
"; $ M = $ n; echo $ y; // print the result as 20 echo"
";/*** Variable reference 1: * if the referenced variable is released, * the value before release */unset ($ m) is retained ); // release the given variable if (isset ($ y) {// This variable has echo "this variable exists"; // m is released, however, y saves the value before m release. echo"
"; Echo $ y; // print the result as 20 echo"
";}Else {echo" this variable does not exist ";} if (isset ($ m) {// This variable does not exist echo" this variable exists ";} else {echo "this variable does not exist"; // m is released, so echo does not exist"
";}/*** Variable reference 2: * when the second variable is referenced, the reference relationship with the first variable is automatically removed */$ p = 66; $ q = & $ p; // q refers to the value of p, which is equal to that of p. echo $ q; // print the result as 66 echo"
"; $ R = 77; $ q = & $ r; // q refers to the value of r, which means that q is the alias of r echo $ q; // print the result 66 echo"
"; $ Q = 88; // we change the q value to see if p and r change echo $ p; // The Print result is 66, and p does not change, q and p removed the reference relationship echo"
"; Echo $ r; // The printed result is 88, and r is changed to the q value, indicating that q and r form a new reference relationship echo"
";
The above is the PHP development for Android programmers (4)-variable reference-PhpStorm content. For more information, see PHP Chinese website (www.php1.cn )!