1. Weakly typed languages
2. Variable $x
3. Scope: Global,local,static,parameter.
Global: In the function, refer to the world variable, before you call global. All variables are stored in a named $globals[index]. Global $x = = $GLOBALS [' x ']
Static: Local variables in the function do not want to be destroyed after the execution of the function, with static. This will preserve the last value when the function is called again the next time.
4. Array: $arr =array (x,x,x,x); Var_dump () Array (' a ' = ' = ' aaa ', ' b ' = ' BBB ');
Number length count ($arr)
Iterate array for () loop PHP associative array traversal associative array: foreach ($arr as $key + = $value)
Sort: Sort ($arr) ascending, Rsort ($arr) Descending
5. Object object data types must declare class objects using the Class keyword. A class is a structure that can contain properties and methods. With $this.
6.php set constant define (name,value,true)//Case insensitive constant is global define (' GREET ', ' www.baidu.com ')
7. String concatenation '. '. strlen (str) returns the string length. Strpos (STR,SUBSTR) Find the position of the string substr in str
8. Operator% take-up
9. Super global variable $GLOBALS, $_post,$_get,$_files "
10. Loop foreach ($arr as $value) {}
11. Include ' file.php '
PHP Basics Shorthand