note 5567 deleted from language.oop by irc-html

From: Date: Sat, 19 Jan 2002 19:40:17 +0000
Subject: note 5567 deleted from language.oop by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25267@lists.php.net to get a copy of this message
Is there any particular reason, other than documentation purpose, to declare class member. I've noticed that you can use member variables without declaring them first. Thus the following would not cause any error (I tried it in PHP3 and 4). <PRE> class a { var $b; } $object = new a; $object->c = 'hello'; echo $object->c; </PRE>

« previous php.notes (#25267) next »