Re: simple class & constructor

From: Date: Wed, 20 Oct 2010 00:05:43 +0000
Subject: Re: simple class & constructor
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-308864@lists.php.net to get a copy of this message
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

« previous php.general (#308864) next »