Default argument values in function declaration

A function may define C++-style default values for scalar arguments as follows:

 Example #3 Use of default parameters in functions


The above example will output:

PHP also allows the use of arrays and the special type NULL as default values,

Leave a Reply

Your email address will not be published. Required fields are marked *