note 46601 added to function.xml-set-object

From: Date: Sat, 16 Oct 2004 21:03:18 +0000
Subject: note 46601 added to function.xml-set-object
Groups: php.notes 
Request: Send a blank email to php-notes+get-78676@lists.php.net to get a copy of this message
Adding to 'lmfe at mega dot ist dot utl dot pt' contribution below, I have to say that this behaviour is very usual for PHP if MemberVars of an Object arent initialized from the constructor. What worked best for me so far was something like this: <?php class foo { var $bar // the constructor function foo() { unset($this->bar); // with every instanciation, the variable is cleared for the object } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.xml-set-object.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46601 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46601&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46601&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46601&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46601&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46601&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46601&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46601&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78676) next »