PHP 4.3.11, question about classes
| From: | Michael Hulse | Date: | Wed, 22 Mar 2006 11:27:55 +0000 |
| Subject: | PHP 4.3.11, question about classes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232404@lists.php.net to get a copy of this message | ||
Hi,
I am just learning about classes.
My server is running PHP 4.3.11
Example code:
class testing {
var $what;
}
$linkGenClass = new testing();
$linkGenClass->what = 'hi';
echo $linkGenClass->what;
Why does the constructor require the "()"?
I have seen many examples via google that do not use "()".
Should I worry about capitalizing the first letter of the class?
Can class names have underscores?
Are spaces allowed on either side of the "->"?
Is "var $what" PHP 4 and 5, whereas "public $what" is PHP 5?
Got any good links to class tutorials for PHP 4.3.11?
Sorry to sound like a PHP noob.
TIA,
Cheers,
Micky