note 19064 added to function.xml-set-object

From: Date: Thu, 14 Feb 2002 16:10:44 +0000
Subject: note 19064 added to function.xml-set-object
Groups: php.notes 
Request: Send a blank email to php-notes+get-26613@lists.php.net to get a copy of this message
Call-time pass-by-reference has been deprecated, so the example is buggy as was already mentionned. However since 4.04 (I think) "new" can return objects by reference. So the clean way to have both the parser initialised in the constructor, and to save the result in your object is to do $xml_parser = & new xml(); see http://www.php.net/manual/en/language.oop.newref.php Ivan -- http://www.php.net/manual/en/function.xml-set-object.php http://master.php.net/manage/user-notes.php?action=edit+19064 http://master.php.net/manage/user-notes.php?action=delete+19064 http://master.php.net/manage/user-notes.php?action=reject+19064

« previous php.notes (#26613) next »