Copy Code code as follows:
<?php
Reference
$one = "Test";
two=& $one;//equivalent to address, two variables to an address
Dynamic variables
$one = "######";
$two = "one";
$three = "two";
echo $three. " <br>/Output "two"
echo $ $three. " <br>/Output "one"
echo $$ $three. " <br>/Output "######"
There are 8 types in PHP
4 kinds of scalar: int integer
BOOL Boolean
Float,double,real
String
2 Types of composite: array
Object
2 Special types: Resource type Resource
Empty type null
Declaration of integers
$int = 10; Decimal declaration
$int =045;//Octal statement
$int =0xff;//Hexadecimal Declaration
$float =3.14e+5;//Scientific Counting method
$float =3.14e-5;
It's all false.
$bool =false;
$bool = 0;
$bool = 0.000;
$bool =null;
$bool = "";
$bool = "";
$bool = "0";
$bool =array ();
The declaration of a string
1. Single and double quotes can declare strings
2. The declared string has no length limit
3. In a double quote string, you can either parse the variable directly or use the escape character directly (you can escape the single quotation mark itself, or you can escape the escape character "\")
4. In a single quote string, you cannot parse a variable directly, or you can use an escape character
5. Double quotes can no longer be used in double quotes, single quotes cannot be used again
6. It is best to use single quotes,
$str = ' AAAAA ';
$str = "AAAA";
Delimiter declaration string, large number of strings
Test is a custom string that cannot be followed by any characters, nor can spaces
You also want to end with test this custom string, no characters before ending
$str =<<<test
This write content ...
Test
?>