View Single Post
Old 11-04-2007, 10:37 PM   #1 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default So whats so good about __construct()?

PHP Code:
<?php
class construction
{
    function 
__construct()
    {
        echo 
"Sup";
    }
}
class 
construction_2
{
    function 
construction_2()
    {
        echo 
"<br />Sup 2";
    }
}
$c1 = new construction;
$c2 = new construction_2;
?>
Does the same thing, I don't see any advantages in it. Unless the class name is extremely long.
Nor is offline  
Reply With Quote