Use of php learning variables. Copy the code as follows :? Php Reference $ onetest; two $ one; is equivalent to transferring an address. two variables point to an address dynamic variable $ one #####; $ twoone; $ threetwo; echo $ t
The code is as follows:
// Reference
$ One = "test ";
Two = & $ one; // equivalent to the transfer address. the two variables point to an address.
// Dynamic variables
$ One = "######";
$ Two = "one ";
$ Three = "two ";
Echo $ three ."
"; // Output" two"
Echo $ three ."
"; // Output" one"
Echo $ three ."
"; // Output "######"
// Php has eight types
// Four scalar types: int integer
// Bool boolean
// Float, double, real
// String
// Two composite types: array
// Object
// Two special types: resource
// Null
// Integer declaration
$ Int = 10; // decimal declaration
$ Int = 045; // octal declaration
$ Int = 0xff; // hexadecimal declaration
$ Float = 3.14E + 5; // Scientific notation
$ Float = 3.14E-5;
// When all values are false
$ Bool = false;
$ Bool = 0;
USD bool = 0.000;
$ Bool = null;
$ Bool = "";
$ Bool = "";
$ Bool = "0 ";
$ Bool = array ();
// String declaration
// 1. single quotation marks and double quotation marks can both declare strings
// 2. the declared string has no length limit
// 3. in a double quotation mark string, both variables can be parsed directly and escape characters can be used directly (the single quotation mark itself can be escaped or the escape character "\" can be escaped "\")
// 4. variables cannot be parsed directly or escape characters in single quotes.
// 5. You cannot use double quotation marks in double quotation marks.
// 6. it is best to use single quotes,
$ Str = 'aaaaa ';
$ Str = "aaaa ";
// The delimiters declare strings, a large number of strings
// Test is a custom string, which cannot contain any characters or spaces.
// It must end with the custom string "test". no character is allowed before the end.
$ Str = < This write content ......
Test;
?>
The http://www.bkjia.com/PHPjc/323473.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/323473.htmlTechArticle code is as follows :? Php // Reference $ one = "test"; two = $ one; // equivalent to the transfer address, the two variables point to an address // dynamic variable $ one = "######"; $ two = "one"; $ three = "two "; echo $ t...