On 7/11/05, Alessandro Rosa <[EMAIL PROTECTED]> wrote:
> Is there the possibility to have in PHP multiple class constructors
> as in C++ or just one ?

Doesn't seem as though you can:

> cat class.php 
#!/usr/bin/php
<?php

error_reporting( E_ALL );

class Foo
{
    function __construct()
    {

    }

    function __construct()
    {

    }
}

$f = new Foo;

?>


> ./class.php 
PHP Fatal error:  Cannot redeclare __construct() in
/home/greg/class.php on line 13

Fatal error: Cannot redeclare __construct() in /home/greg/class.php on line 13


-- 
Greg Donald
Zend Certified Engineer
MySQL Core Certification
http://destiney.com/

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

Reply via email to