|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-05 11:18 UTC] chregu@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 20:00:01 2025 UTC |
Description: ------------ SimpleXML objects can be saved into a session file, but, they are not being extracted. Reproduce code: --------------- <?php session_start(); // TEST1.PHP $xml_string = <<< EOT <GenQuoteDetails> <BaseFareAmt>26400</BaseFareAmt> <TaxDataAry><TaxData><Country>US</Country><Amt>00019.80</Amt></TaxData></TaxDataAry> </GenQuoteDetails> EOT; $xml_tree = simplexml_load_string( $xml_string ); $_SESSION['tree'] = $xml_tree; echo"<pre>";print_r($xml_tree);echo"</pre>"; ?> <?php session_start(); // TEST2.PHP $xml_tree = $_SESSION['tree']; echo"<pre>";print_r($xml_tree);echo"</pre>"; ?> Expected result: ---------------- SimpleXMLElement Object ( [BaseFareAmt] => 26400 [TaxDataAry] => SimpleXMLElement Object ( [TaxData] => SimpleXMLElement Object ( [Country] => US [Amt] => 00019.80 ) ) ) Actual result: -------------- SimpleXMLElement Object ( )