For more information about the use of php basic learning variables, see.
For more information about the use of php basic learning variables, see.
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;
>