Edit report at http://bugs.php.net/bug.php?id=52382&edit=1
ID: 52382 Updated by: ahar...@php.net Reported by: giorgio dot liscio at email dot it Summary: NULL in method arguments is casted to string? -Status: Open +Status: Bogus Type: Bug Package: DOM XML related Operating System: all ? xp x64 PHP Version: 5.3.2 New Comment: They're not equivalent: you're providing a value for the "value" parameter to DOMDocument::createElement(), so yes, it will get coerced into an empty string using PHP's usual type juggling mechanism. Previous Comments: ------------------------------------------------------------------------ [2010-07-20 09:46:25] giorgio dot liscio at email dot it Description: ------------ hi, test this: header("Content-Type: text/plain"); $doc = new \DOMDocument() $doc->appendChild($doc->createElement("root", NULL)); echo $doc->saveXML(); echo "\n\nshould be equivalent to:\n\n"; $doc = new \DOMDocument() $doc->appendChild($doc->createElement("root")); echo $doc->saveXML(); i hope other DOM methods will work good... otherwise fix is needed thank you! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52382&edit=1