ID:               28152
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gyumee at dreamwiz dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         SimpleXML related
 Operating System: debian gnu/linux sid
 PHP Version:      5.0.0RC1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Searching the bug database first helps too to find that it's bogus.


Previous Comments:
------------------------------------------------------------------------

[2004-04-26 08:17:21] gyumee at dreamwiz dot com

Description:
------------
I want to cache the object returned by simplexml_load_string() or
simplexml_load_file().
Fisrt, I seriaize the object and save it into file.
And I read saved string and try to unserialize it.
But PHP not handle it collectly.

Reproduce code:
---------------
<?
    $data = <<<XML
<?xml version='1.0' standalone='yes'?>
<movies>
    <movie>
        <title>PHP: Behind the Parser</title>
    </movie>
</movies>
XML;
    $xml = simplexml_load_string($data);
    $str = serialize($xml);
    echo "$str\n";
    $new_xml = unserialize($str);
    echo serialize($new_xml)."\n";
?>


Expected result:
----------------
O:17:"simplexml_element":1:{s:5:"movie";O:17:"simplexml_element":1:{s:5:"title";s:22:"PHP:
Behind the Parser";}}
O:17:"simplexml_element":1:{s:5:"movie";O:17:"simplexml_element":1:{s:5:"title";s:22:"PHP:
Behind the Parser";}}


Actual result:
--------------
O:17:"simplexml_element":1:{s:5:"movie";O:17:"simplexml_element":1:{s:5:"title";s:22:"PHP:
Behind the Parser";}}
 
Warning: Node no longer exists in
/home/gen128/project/mogaha_2004/docs/08_devel/02_research/php-xml/simplexml_performance/test_serialize_xml.php
on line 13
 
Warning: Node no longer exists in
/home/gen128/project/mogaha_2004/docs/08_devel/02_research/php-xml/simplexml_performance/test_serialize_xml.php
on line 13
 
Warning: Node no longer exists in
/home/gen128/project/mogaha_2004/docs/08_devel/02_research/php-xml/simplexml_performance/test_serialize_xml.php
on line 14
O:17:"simplexml_element":0:{}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28152&edit=1

Reply via email to