Data type
PHP has only three basic data types: integers, floating point numbers (or real numbers, double precision numbers) and strings. Strings can use single quotes and double quotes, but they have different meanings: variables can only be used within double quotes.
Variable
"$" should be added in front of the variable. There is no need to specify (or define) the type of the variable in advance when using the variable. Different types of data can be assigned to the same variable. But if you want to use global variables, you must use global instructions (or add them to the $GLOBALS[] array). To use static variables, use static instructions.
Array
When using an array, you do not need to specify its type and size, you can use it directly. Elements of the same array can have different data types.
Operator
The C language operators are generally retained. Added string concatenation character "." (use "->" when accessing object members). Added "=>" operator, used to assign initial value to array. In addition, logical AND ("&&") and logical OR ("||") can also be used with "and" and "or", adding logical exclusive OR "xor"
Basic sentences
It is required to master the if-else statement, switch-case statement, for statement, while statement, do-while statement, continue statement, and break statement. require statement and include statement, used to insert a disk file
Definition and use of functions
Use function to define a function without specifying the function type and parameter type.
function function name (parameter 1, parameter 2,...)
{ Statement 1;
Statement 2;......
}
Excerpted from bing7599069’s column