Is it possible to overload a function is a class. I would like to have the same function defined differently depending on the number of arguments passed in. For example:

function foo() {}
function foo($a) {}
function foo($a, $b) ()

I know I could do it with:

function foo($a = "", $b = "") {}

But that is such an ugly hack ...

Thanks,

Jean-Christian Imbeault


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to