First post: Optional parameters in PHP function prototypes Why do you write this? ,
First, let's start. Write something simple.
Just started to learn PHP, when looking at PHP manual encountered a problem: in the function prototype with optional parameters, the optional parameters of the wording can not understand.
such as the Explode function
Array explode (string $delimiter, string $string [, int $limit])
Optional parameters are enclosed in "[square brackets]", then the third parameter is $limit optional.
But why not write it like this:
Array explode (string $delimiter, string $string, [int $limit])
It is impossible to understand the position of this comma.
http://www.bkjia.com/PHPjc/1042018.html www.bkjia.com true http://www.bkjia.com/PHPjc/1042018.html techarticle first post: Optional parameters in PHP function prototypes Why do you write this? , the first one, it's the beginning. Write something simple. Just started to learn PHP, when looking at PHP manual encountered a ...