#36987 [Opn->Bgs]: print_r doesn't show DOM Objects properties

From: Date: Wed, 05 Apr 2006 14:34:20 +0000
Subject: #36987 [Opn->Bgs]: print_r doesn't show DOM Objects properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95347@lists.php.net to get a copy of this message
ID: 36987 Updated by: tony2001@php.net Reported By: takacsz at hik dot hu -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: windows xp PHP Version: 5.1.2 New Comment: Duplicate of bug #30786. Previous Comments: ------------------------------------------------------------------------ [2006-04-05 14:23:28] takacsz at hik dot hu Description: ------------ I find a possibly bug, when I wanted to print the structure of a DOMDocument or a DOMDocumentType object. print_r() outputs the object type correctly, but the properties are missing. $doc = $imp->createDocument(); $doc->loadXML($xmlString); print_r($doc->doctype); the code outputs: DOMDocumentType Object ( ) But the subobjects of $doc->doctype exist. Reproduce code: --------------- <?php $doc = new DOMDocument(); $doc->loadXML('<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE book PUBLIC "-//EDUCATIO Kht.//DocBook V4.3-alapu DTD V1.1//HU" "http://www.hik.hu/tankonyvpalyazat/dtd2/tankonyv.dtd"><book></book>'); print_r($doc->doctype); ?> Expected result: ---------------- something like that: DOMDocumentType Object ( publicId systemId name entities notations internalSubset ) Actual result: -------------- DOMDocumentType Object ( ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36987&edit=1

« previous php.bugs (#95347) next »