Edit report at https://bugs.php.net/bug.php?id=5789&edit=1
ID: 5789
Comment by: maiadrs at mail dot com
Reported by: steeven at kali dot com dot cn
Summary: missing arguments
Status: Closed
Type: Bug
Package: Other
Operating System: win98
PHP Version: 4.0.1pl2
Block user comment: N
Private report: N
New Comment:
(https://www.anthemdotnet.com/19325/how-to-turn-off-sleep-mode-on-iphone/).github.com
(https://cagtermal.com/19084/how-to-turn-off-sleep-mode-off-on-iphone/).github.com
Previous Comments:
------------------------------------------------------------------------
[2000-07-26 07:22:01] rasmus@php.net
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.
------------------------------------------------------------------------
[2000-07-26 03:42:14] steeven at kali dot com dot cn
here is a short sample program:
<?php
test();
function test($a1){
echo "test";
}
?>
and an warning is shown:
Warning: Missing argument 1 for test() in e:\apache\htdocs\bbs\test1.php on line 3
test
There is no problem when I use php4.0.0, anyone have the same problem?
win98+apache+php4.0.1pl2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=5789&edit=1