php (custom functions and system built-in functions)

PHP uses function to define functions, which is consistent with js.

The keyword parameter (default parameter) is placed at the end, and no value is required.

Insert picture description here
Regarding scope, note that external variables cannot be used in the function body. (This curious flower)

Insert picture description here
Insert picture description here

PHP supports two ways of multi-value parameter passing (the second one needs to correspond to the type parameter)

Insert picture description here
Insert picture description here

PHP supports anonymous function operations (can be referenced by a variable)

Insert picture description here

Insert picture description here

Some built-in functions of php:

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_46456049/article/details/108588607