note 103794 added to language.references.pass

From: Date: Wed, 04 May 2011 03:15:07 +0000
Subject: note 103794 added to language.references.pass
Groups: php.notes 
Request: Send a blank email to php-notes+get-179395@lists.php.net to get a copy of this message
This is the way how we use pointer to access variable inside the class. class talker{ private $data = 'Hi'; public function & get(){ return $this->data; } public function out(){ echo $this->data; } } $aa = new talker(); $d = &$aa->get(); $aa->out(); $d = 'How'; $aa->out(); $d = 'Are'; $aa->out(); $d = 'You'; $aa->out(); the output is "HiHowAreYou" ---- Server IP: 69.147.83.197 Probable Submitter: 203.26.78.66 ---- Manual Page -- http://www.php.net/manual/en/language.references.pass.php Edit -- https://master.php.net/note/edit/103794 Del: integrated -- https://master.php.net/note/delete/103794/integrated Del: useless -- https://master.php.net/note/delete/103794/useless Del: bad code -- https://master.php.net/note/delete/103794/bad+code Del: spam -- https://master.php.net/note/delete/103794/spam Del: non-english -- https://master.php.net/note/delete/103794/non-english Del: in docs -- https://master.php.net/note/delete/103794/in+docs Del: other reasons-- https://master.php.net/note/delete/103794 Reject -- https://master.php.net/note/reject/103794 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179395) next »