#32188 [Opn->Fbk]: Problem when extending a standard class

From: Date: Fri, 04 Mar 2005 15:52:52 +0000
Subject: #32188 [Opn->Fbk]: Problem when extending a standard class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76888@lists.php.net to get a copy of this message
ID: 32188 Updated by: sniper@php.net Reported By: manu at manucorp dot com -Status: Open +Status: Feedback Bug Type: SimpleXML related Operating System: Linux PHP Version: 5.0.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-03-04 11:07:32] manu at manucorp dot com Description: ------------ When i extend SimpleXMLElement there is some weird issue on accessing variable of the class. (perhaps related to bug #28817, i'm not completely sure) Reproduce code: --------------- <?php class Reader extends SimpleXMLElement { public $test; public function extract() { $this->test=array(); var_dump(is_array($this->test)); } } $uploadfile="file.xml"; $rs=simplexml_load_file($uploadfile,"Reader"); $rs->extract(); ?> Expected result: ---------------- bool(true) Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32188&edit=1

« previous php.bugs (#76888) next »