note 105299 deleted from language.types by danbrown

From: Date: Mon, 08 Aug 2011 14:27:35 +0000
Subject: note 105299 deleted from language.types by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182317@lists.php.net to get a copy of this message
Note Submitter: Najeem M Illyas ---- @Ahmadsajid A variable declaration will serve the purpose. If visibility not specified it will be public. <?php class Person { var $firstName; // a PHP String var $middleName; // a PHP String var $lastName; // a PHP String var $age; // a PHP Integer var $hasDriversLicense; // a PHP Boolean function setfname($name) { $this->firstName = $name; return $this->firstName; } } $p = new Person(); echo $p->setfname('Najeem'); //output is Najeem ?>

« previous php.notes (#182317) next »