On Wed, Aug 18, 2010 at 12:23 PM, Ashley Sheridan
wrote:
> Hi list,
>
> I know that some languages such as C++ can overload functions and
> methods by declaring the method again with a different number of
> arguments, and the compiler internally sorts things out, but I can't
> seem to find a simil
On Wed, 2010-08-18 at 12:35 -0400, chris h wrote:
>
>
> Would something like this work for you?
>
>
> class foo
> {
>
>
>public function bar($arg1, $arg2, $arg3=null)
> {
>
>
> if (isset($arg3)){
> {
> return $this->_bar3($arg1, $arg2, $arg3);
>
>
> } else {
>
Would something like this work for you?
class foo
{
public function bar($arg1, $arg2, $arg3=null)
{
if (isset($arg3)){
{
return $this->_bar3($arg1, $arg2, $arg3);
} else {
return $this->_bar2($arg1, $arg2);
}
}
also you may want to look into the fu
3 matches
Mail list logo