note 56193 deleted from language.oop5.overloading by cmb
| From: | cmb@php.net | Date: | Sun, 18 Dec 2016 10:03:49 +0000 |
| Subject: | note 56193 deleted from language.oop5.overloading by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208655@lists.php.net to get a copy of this message | ||
Note Submitter:
----
To those who wish for "real" overloading: there's not really any advantage to using
__call() for this -- it's easy enough with func_get_args(). For example:
<?php
class Test
{
public function Blah()
{
$args = func_get_args();
switch (count($args))
{
case 1: /* do something */ break;
case 2: /* do something */ break;
}
}
}
?>