do classes work properly? - with exe code this time

From: Date: Tue, 27 Jun 2000 13:37:27 +0000
Subject: do classes work properly? - with exe code this time
Groups: php.windows 
Request: Send a blank email to php-windows+get-689@lists.php.net to get a copy of this message
Hello all. This is my code in file "table.php" class Test { var $width; var $height; function Test () { $this->$width = "really longgggggg"; $this->$height = "really highhhhhh"; } function serve () print "This is the width: " . $this->$width . "<br>"; print "This is the height: " . $this->$height . "<br>"; } } Used in another php file as so: <?php require("table.php"); $raw = new Test; $raw->serve(); ?> The output I get is: This is the width: really highhhhhh This is the height: really highhhhhh This happens with other classess too. Any ideas? Note: could it be the use of var? In the manual there is only examples of using var with one variable, unfortunately. I'm used to C++ where an object declares vars and funcs. Thanks. Andrew.

« previous php.windows (#689) next »