note 42687 deleted from function.func-get-arg by danbrown
| From: | danbrown@php.net | Date: | Fri, 06 Feb 2015 21:35:27 +0000 |
| Subject: | note 42687 deleted from function.func-get-arg by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201661@lists.php.net to get a copy of this message | ||
Note Submitter:
----
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?