PHP 4.3.11, question about classes

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

 



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

--
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