PHP Default Argument Values Function

PHP allows you to define C++ style default argument values. In such case, if you don’t pass any value to the function, it will use default argument value.

Let’ see the simple example of using PHP default arguments in function.

Example 1


Example 2


Example 3


Spread the love

Leave a Reply

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