"Ken Sommers" <[EMAIL PROTECTED]> wrote in message

> What is function overloading?

Overloading is the ability to define several functions by the same
name but with different parameter lists and let the compiler figure
out which one you meant by the parameters you pass to it.

For instance, in C++ you could define a class Square, and then
define a number of different constructors:  Square(void),
Square(Square orig), Square(Point topleft, Point bottomright),
Square(int left, int top, int width), and so on.

Since PHP is untyped, this would in any case reduce to a variable
number of parameters, which is far less useful.

> Can a php user-defined function call itself from within itself?


    function recurse($n) {
        echo "  $n";
        if ($n > 1)


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to