#50405 [NEW]: SimpleXML __get/__set not invoked

2009-12-07 Thread babooka at hotmail dot com
From: babooka at hotmail dot com
Operating system: Linux
PHP version:  5.2.11
PHP Bug Type: SimpleXML related
Bug description:  SimpleXML __get/__set not invoked

Description:

Related to:
http://bonsai.php.net/bug.php?id=45971

SimpleXML magic __get / __set elements are not called, as a result
you can not extend the XML parsing and in addition to that SoapClient's
classmap becomes useless, they are not called there either.

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=50405edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50405r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50405r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50405r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50405r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50405r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50405r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=50405r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=50405r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=50405r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=50405r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=50405r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=50405r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=50405r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50405r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=50405r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=50405r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=50405r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=50405r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=50405r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=50405r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=50405r=mysqlcfg



#45971 [Com]: SimpleXMLElement does not overload properly

2009-12-03 Thread babooka at hotmail dot com
 ID:   45971
 Comment by:   babooka at hotmail dot com
 Reported By:  dennis at d23 dot nl
 Status:   No Feedback
 Bug Type: SimpleXML related
 Operating System: *
 PHP Version:  5.2.6
 New Comment:

Still does not work on 5.3.1


Previous Comments:


[2009-02-20 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2009-02-13 00:15:16] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2008-09-02 09:56:51] dennis at d23 dot nl

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 this bug report at http://bugs.php.net/?id=45971edit=1