The first blog post: Why are the optional parameters in the PHP function prototype written this way? ,_PHP Tutorial

WBOY
Release: 2016-07-13 09:45:25
Original
809 people have browsed it

First blog post: Why are the optional parameters in the PHP function prototype written this way? ,

The first article is the beginning. Simply write something.

I just started learning PHP and encountered a problem when reading the PHP Manual: In the function prototype containing optional parameters, the optional parameters are not written in a clear way.

For example, explode function

<span>array explode ( string $delimiter , string $string [, int $limit ] )
</span>
Copy after login

Optional parameters are enclosed in "[square brackets]", then the third parameter $limit is an optional parameter.

But why not write it like this:

<span>array explode ( string $delimiter , string $string ,[int $limit ] )
</span>
Copy after login

I really can’t understand the position of this comma.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1042018.htmlTechArticleFirst blog post: Why are the optional parameters in the PHP function prototype written this way? , the first article, that’s the beginning. Simply write something. I just started learning PHP and encountered something while reading the PHP Manual...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template