From: dennis at d23 dot nl Operating system: Fedora 8/Windows PHP version: 5.2.6 PHP Bug Type: SimpleXML related Bug description: SimpleXMLElement does not overload properly
Description: ------------ When extending SimpleXMLElement the __get() and __set() methods of the extending class do not get invoked. __call however works as expected. Reproduce code: --------------- <?php class TestSimpleXMLElement extends SimpleXMLElement { function __set($name, $value) { echo "__set $name\n"; } function __get($name) { echo "__get $name\n"; } function __call($name, $parameters) { echo "__call $name\n"; } } $element = new TestSimpleXMLElement('<root/>'); // __set $element->child1 = 1; // __get $element->child2; // __call $element->method(); ?> Expected result: ---------------- __set child1 __get child2 __call method Actual result: -------------- __call method -- Edit bug report at http://bugs.php.net/?id=45971&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45971&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45971&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45971&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45971&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45971&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45971&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45971&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45971&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45971&r=support Expected behavior: http://bugs.php.net/fix.php?id=45971&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45971&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45971&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45971&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45971&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45971&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45971&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45971&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45971&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45971&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45971&r=mysqlcfg