|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45407 domxml function not documented
Submitted: 2008-07-01 17:51 UTC Modified: 2008-07-26 11:25 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cweismann at ea dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 4.3.2 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-07-01 17:51 UTC] cweismann at ea dot com
I ran into problems with the memory leak with domxml. I am working on a very old and very large website and am unable to upgrade to PHP5 until I have converted all of the old code, so I am writing my code to be compatible with both PHP4.3.2 and PHP5. After much searching, I located a bug report at that mentioned $doc->free(), but I could not find any documentation for this function. I later found a very good description in the below post on This fixed the problem, but it would make life easier for other people with the same problem if the $doc->free(); function was documented.

ej at campbell *dot* name
30-Nov-2003 07:54
<!-- quote -->
The DOM XML parser does not automatically free memory when a DomDocument goes out of scope.

If you're using the DOM parser to parse several XML files as part of a long running script, you must free the DomDocument manually or a memory leak will occur.

To free a DOM document allocated by domxml_open_mem, do the following:

$doc = domxml_open_mem("$contents");

<!-- end quote -->


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-10 14:02 UTC] cweismann at ea dot com
corrected version number
 [2008-07-26 11:25 UTC]
I really doubt anyone will be document PHP4 specific features :|
PHP4 support was discontinued over 6months ago and I see no reason to put any effort in documenting it.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 03:01:30 2024 UTC