note 88609 added to language.variables.scope

From: Date: Sat, 31 Jan 2009 12:17:23 +0000
Subject: note 88609 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-150032@lists.php.net to get a copy of this message
I should just mention about my previous note that if the global you're setting is an object then no reference is necessary because of the way PHP deals with objects. If you don't want to reference to the same object however you can use the clone keyword. <?php //... global $Obj; $this->obj_copy = clone $Obj; //... ?> ---- Server IP: 117.104.160.194 Probable Submitter: 121.222.234.117 ---- Manual Page -- http://www.php.net/manual/en/language.variables.scope.php Edit -- https://master.php.net/note/edit/88609 Del: integrated -- https://master.php.net/note/delete/88609/integrated Del: useless -- https://master.php.net/note/delete/88609/useless Del: bad code -- https://master.php.net/note/delete/88609/bad+code Del: spam -- https://master.php.net/note/delete/88609/spam Del: non-english -- https://master.php.net/note/delete/88609/non-english Del: in docs -- https://master.php.net/note/delete/88609/in+docs Del: other reasons-- https://master.php.net/note/delete/88609 Reject -- https://master.php.net/note/reject/88609 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150032) next »