#44926 [Opn->WFx]: DOMDocument::__set_state function does not exists
| From: | chregu@php.net | Date: | Tue, 06 May 2008 12:06:55 +0000 |
| Subject: | #44926 [Opn->WFx]: DOMDocument::__set_state function does not exists | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-124750@lists.php.net to get a copy of this message | ||
ID: 44926
Updated by: chregu@php.net
Reported By: francesco dot spegni at gmail dot com
-Status: Open
+Status: Wont fix
Bug Type: DOM XML related
Operating System: ubuntu
PHP Version: 5.2.6
New Comment:
What do you want to achieve with that anyway? You can't var_export a
DOMDocument, not at least to something useful. You have to use
->saveXML
and ->loadXML(), if you want to serialize a DOMDocument.
Previous Comments:
------------------------------------------------------------------------
[2008-05-06 10:15:12] francesco dot spegni at gmail dot com
Description:
------------
please, my php version is not actually 5.2.6, but PHP 5.2.4-2ubuntu5
with Suhosin-Patch 0.9.6.2. i'm sorry to have cheated, but i was not
able to install the last version without messing my system, and looking
for the changelogs i didn't find any reference to a problem like the one
i'm signaling. to me, it seems that the version i have is the last one
in the ubuntu's repositories.
when i execute the following code, var_export produce a
DOMDocument::__set_state call, but the eval function says that
DOMDocument::__set_state function does not exist.
Fatal error: Call to undefined method DOMDocument::__set_state() in
/home/spegni/Eclipse/workspace/automa_interpreter/test_bug.php(8) :
eval()'d code on line 1
i've searched through the documentation, finding nothing interesting
and to me it seems a buggy behavior. let me know if i'm wrong. many
thanks in advance.
Reproduce code:
---------------
<?php
$foo = new DOMDocument();
$strCode = "\$object = " . var_export($foo, TRUE) . "; return 1;";
print "execute: \n\n".$strCode."\n";
$resEval = eval($strCode);
print "eval returned: " . $resEval . "\n";
?>
Expected result:
----------------
i expect the eval code to be executed without error and return result
"1"
Actual result:
--------------
Fatal error: Call to undefined method DOMDocument::__set_state() in
/home/spegni/Eclipse/workspace/automa_interpreter/test_bug.php(8) :
eval()'d code on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44926&edit=1