Bug #5789 [Com]: missing arguments

From: Date: Sun, 29 Jan 2023 07:25:00 +0000
Subject: Bug #5789 [Com]: missing arguments
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243588@lists.php.net to get a copy of this message
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


Thread (1 message)

  • maiadrs at mail dot com
  • Unknown Message
    • maiadrs at mail dot com
« previous php.bugs (#243588) next »