Classes broken?

From: Date: Mon, 15 Nov 1999 14:49:51 +0000
Subject: Classes broken?
Groups: php.version4 
Request: Send a blank email to php-version4+get-6241@lists.php.net to get a copy of this message
Hi, I am currently using PHP4 Beta 2 on my local system. I would like to ask whether the classes are broken or this is supposed to be a feature. The classes are not strict. class Blah { var $mysinglevar; } $pointer = new Blah; $pointer -> anything_i_want = "Not good!"; print $pointer -> anything_i_want; This is not a real object model I use in C++. Also, classes in classes would be useless in this case! Example: class Class1 { var $myvar; var $childclass; } class Class2 { var $age; var $name; var $etc; } $mainthread = new Class1; $mainthread -> childclass = new Class2; $mainthread -> childclass -> age = "1241"; The Class2 is useless in the above case. Also, I would like to know if there is a quick and easy way to determine what "class" the variable is associated to? PHP is an interpreted language, and it think it does (or should?) allow this. Thank you. -- Faisal Nasim (the Whiz Kid) Web: http://wss.hypermart.net/ FAX: (815) 846-2877 AOL IM: Whiz Swift

« previous php.version4 (#6241) next »