note 46371 deleted from migration5.oop by nlopess

From: Date: Fri, 08 Oct 2004 17:33:45 +0000
Subject: note 46371 deleted from migration5.oop by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78189@lists.php.net to get a copy of this message
Note Submitter: mina86 at tlen dot pl ---- In respond to rbates: You can call __get() method if you want: <?php class Greater { function __get($name) { if ($name==='hi') { return $this->__get('hello'); } elseif ($name==='hello') { return 'Hello, World!'; } return "Unknown: $name"; } } $greater = new Greater(); echo($greater->hello . "\n"); echo($greater->hi . "\n"); ?>

« previous php.notes (#78189) next »