note 42687 added to function.func-get-arg
| From: | php-general at lists dot php dot net | Date: | Wed, 26 May 2004 13:29:23 +0000 |
| Subject: | note 42687 added to function.func-get-arg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70114@lists.php.net to get a copy of this message | ||
very clever unless you need to specify at least two parameters of the same type - which is which?
Obviously, you may decide on some defaults, but then the whole thing gets ugly. What if you need a
string ONLY if a boolean was also supplied? The type-checking becomes the main focus of your
function, shit. For the sake of clean code you should specify a clean interface to your functions,
and decide on what and where is passed as an argument. Yes, you can always code a
do_absolutely_everything() function, but is there any sense?
----
Manual Page -- http://www.php.net/manual/en/function.func-get-arg.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42687
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42687&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42687&report=yes
Search -- http://master.php.net/manage/user-notes.php