Strange that you get this error. Normally you should get a "Fatal error:
Cannot redeclare forum::forum() ...."

PHP does not support 'function overloading', at least not in a way java
is doing it. One of the drawbacks of a free typed langauge (in contrary
to a strictly typed one).

cheerio
/rudy

On Wed, 2004-05-12 at 14:43, Lieve Vissenaeken wrote:
> Please ,could anybody help me ? I'm not so familiar with PHP.
> 
> I've the following problem with my code  when I try to make an object from
> the class "forum" with the code "$test=new forum()".  I always get a warning
> on this: "Warning: Missing argument 1 for forum() in
> /lvdata/www/tennis/php/sql.inc"
> Is it not possible to just make a default constructor and an other
> constructor like in JAVA ?
> Thanks for helping....
> 
> 
> class forum
> {
>      var $naam;
>      var $tijd;
>      var $tekst;
> 
>      function forum()
>      {
>      }
> 
> 
>      function forum($naam,$tijd,$tekst)
>      {
>           $this->naam=$naam;
>           $this->tijd=$tijd;
>           $this->tekst=$tekst;
>     }
> }
> 
> 
> $test=new forum();

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to