Re: PHP 4.0 Bug #5789 Updated: missing arguments

From: Date: Wed, 26 Jul 2000 05:33:33 +0000
Subject: Re: PHP 4.0 Bug #5789 Updated: missing arguments
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-26216@lists.php.net to get a copy of this message
Just a note for the reporter: You can also use the func_num_args() stuff. See the manual. On 26 Jul 2000, Bug Database wrote the following to php-dev@lists.php.net : > ID: 5789 > Updated by: rasmus > Reported By: steeven@kali.com.cn > Status: Closed > Bug Type: Other > Assigned To: > Comments: > > If 4.0.0 didn't complain, then either it was broken or you had your error reporting level > set differently. If you want a function to have an optional argument you have to set a default > value. ie. function test($a1=0) { ... } > Now you can call just test() without an argument. > > > Full Bug description available at: http://bugs.php.net/?id=5789 > > >

« previous php.dev (#26216) next »