note 38492 deleted from function.overload by nlopess
| From: | nlopess@php.net | Date: | Wed, 24 Dec 2003 13:47:44 +0000 |
| Subject: | note 38492 deleted from function.overload by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62417@lists.php.net to get a copy of this message | ||
Note Submitter: dave at etherealsys dot com
----
This is not like the method overloading in Java. To accomplish this, you can try the following:
function javaLikeOverload($a = NULL, $b = NULL){
if($a && $b){
....
}
else if ($a){
....
}
else{
...
}
}
likewise, you can check if values are array, int, string, object, etc. or a combination of both.