note 65365 added to language.oop5.overloading

From: Date: Sat, 29 Apr 2006 15:42:16 +0000
Subject: note 65365 added to language.oop5.overloading
Groups: php.notes 
Request: Send a blank email to php-notes+get-110099@lists.php.net to get a copy of this message
I thought i had to use a class like Setter (see top) but that still works: <?php class dynamic_class_vars{ public function __construct(){ } public function __get($var){ return $this->{$var}; } public function __set($var,$value){ $this->{$var} = $value; } } $object = new dynamic_class_vars(); $object->a = 'Hello'; $object->b = 'World'; echo $object->a.' '.$object->b; ?> I wondered that it works. But this would Functions effects a lot of new possibilities fpr developers. ---- Server IP: 212.124.37.9 Probable Submitter: 84.160.23.233 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php Edit -- http://master.php.net/note/edit/65365 Del: integrated -- http://master.php.net/note/delete/65365/integrated Del: useless -- http://master.php.net/note/delete/65365/useless Del: bad code -- http://master.php.net/note/delete/65365/bad+code Del: spam -- http://master.php.net/note/delete/65365/spam Del: non-english -- http://master.php.net/note/delete/65365/non-english Del: in docs -- http://master.php.net/note/delete/65365/in+docs Del: other reasons-- http://master.php.net/note/delete/65365 Reject -- http://master.php.net/note/reject/65365 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#110099) next »