Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- DOMDocumentFragment::appendXML() with children with properties. --CREDITS-- Eric ..
Decoded Output download
--TEST--
DOMDocumentFragment::appendXML() with children with properties.
--CREDITS--
Eric Lee Stewart <[email protected]>
# TestFest Atlanta 2009-05-24
--EXTENSIONS--
dom
--FILE--
<?php
$document = new DOMDocument;
$root = $document->createElement('root');
$document->appendChild($root);
$fragment = $document->createDocumentFragment();
$fragment->appendXML('<foo id="baz">bar</foo>');
$root->appendChild($fragment);
print $document->saveXML();
?>
--EXPECT--
<?xml version="1.0"?>
<root><foo id="baz">bar</foo></root>
Did this file decode correctly?
Original Code
--TEST--
DOMDocumentFragment::appendXML() with children with properties.
--CREDITS--
Eric Lee Stewart <[email protected]>
# TestFest Atlanta 2009-05-24
--EXTENSIONS--
dom
--FILE--
<?php
$document = new DOMDocument;
$root = $document->createElement('root');
$document->appendChild($root);
$fragment = $document->createDocumentFragment();
$fragment->appendXML('<foo id="baz">bar</foo>');
$root->appendChild($fragment);
print $document->saveXML();
?>
--EXPECT--
<?xml version="1.0"?>
<root><foo id="baz">bar</foo></root>
Function Calls
None |
Stats
MD5 | 826b4ede2fd64b8f88ea91a18107f4b9 |
Eval Count | 0 |
Decode Time | 99 ms |