What's difference between __construct and function with same name as class has?

Viewed 14793

Possible Duplicate:
what is the function __construct used for?

is there any difference between __construct function and function with same name as class has?

class foo {
    function foo ($something){
        echo "I see ".$something." argument";
    }
}

class bar {
    function __construct ($something){
        echo "<br />
            I see ".$something." argument again";
    }
}

$foo = new foo("foo");
$bar = new bar("bar");
5 Answers
Related