A function in PHP can be built-in or user-defined; however, they are both called the same way.
The general form of a function call is
The number of arguments varies from one function to another. Each argument can be any valid expression, including other function calls.
Here is a simple example of a predefined function:
$length = strlen("John");
strlen is a standard PHP function that returns the length of a string. Therefore, $length is assigned the length of the string "John": four.
Here's an example of a function call being used as a function argument:
$length = strlen(strlen("John"));
You probably already guessed the result of this example. First, the inner strlen("John") is executed, which results in ...