Re: constructors in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-07-11 at 16:44 +0200, Alessandro Rosa wrote:
> Is there the possibility to have in PHP multiple class constructors
> as in C++ or just one ?
> I would be sure about it in order to prevent useless mad investigations
> in the code I'm writing.
> 
> Thanks in advance ...
> 
> Alessandro Rosa

You can't make several definitions of constructors. What you _CAN_ do is
to use func_get_args ( www.php.net/func_get_args ) to determine how many
args were passed :)

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux