ID: 49251
Updated by: [email protected]
Reported By: ies_clan at hotmail dot com
-Status: Open
+Status: Verified
Bug Type: SimpleXML related
-Operating System: Windows XP SP3
+Operating System: *
-PHP Version: 5.3.0
+PHP Version: 5.*, 6 (2009-08-17)
New Comment:
Quite weird indeed. And verified in all branches.
Previous Comments:
------------------------------------------------------------------------
[2009-08-14 13:49:22] ies_clan at hotmail dot com
Description:
------------
if u try to create a new object from an simple xml-objekt-property you
got an simple xml object :(
Reproduce code:
---------------
class test {}
$Xml = new
SimpleXMLElement('<root><classname>stdclass</classname></root>');
$XmlClass = new $Xml->classname('<root />');
print_r($XmlClass);
$MyClass = new stdclass();
$MyClass->classname = 'test';
$stdclass = new $MyClass->classname();
print_r($stdclass);
Expected result:
----------------
stdclass Object
(
)
test Object
(
)
Actual result:
--------------
SimpleXMLElement Object
(
)
test Object
(
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49251&edit=1