Re: simple class & constructor

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

 



Note that you still have a typo, but maybe it's only in your email messages:

     class simpleConstructer {

       function __construct() {
         echo "running the constructor";
       }
     }
     $test = new simpleConstructor();

The class is misspelled; it should be simpleConstructor. As a side note,
it's common convention to name classes with a leading capital letter, e.g.
SimpleConstructor. That's just convention, though, and I'm sure it differs
in some languages. Even in PHP stdClass doesn't, but most other classes do.

David

[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