NYCPHP Meetup

NYPHP.org

[nycphp-talk] Method overloading

Michael B Allen ioplex at gmail.com
Fri Dec 14 17:38:44 EST 2007


On 12/14/07, Kenneth Downs <ken at secdat.com> wrote:
> Ben Sgro wrote:
> > Ok, so you the answer is "no", you can't do method overloading in php?
>
> AFAIK, Yes, the answer is no :)

Method overloading could mean overloading the method in a subclass so
to say "you can't do method overloading in php" is false. PHP does
support method overloading. It just doesn't support using the same
method name with different signatures.

But as you point out, PHP does allow optional / default values instead
which achieves a very similar result (and in fact I find it to be
superior in many ways).

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list