note 115238 deleted from functions.arguments by cmb
| From: | cmb@php.net | Date: | Sun, 10 Nov 2019 13:20:42 +0000 |
| Subject: | note 115238 deleted from functions.arguments by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213030@lists.php.net to get a copy of this message | ||
Note Submitter: lucas dot ekrause at gmail dot com
----
In addition to jcaplan@bogus.amazon.comâs comment
(http://www.php.net/manual/de/functions.arguments.php#62803) you could also simply write
<?php
function f($x=4){echo $x."\n";}
function g($x=null){for($i=0; $i<2; $i++){call_user_func_array("f", !is_null($x) ?
array($x) : array());}}
?>