php.net |  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
Votes:1
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cweismann at ea dot com
New email:
PHP Version: OS:

 

 [2008-07-01 17:51 UTC] cweismann at ea dot com
Description:
------------
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 http://bugs.php.net/bug.php?id=30911&edit=1 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 http://us2.php.net/domxml-open-mem. 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");

$doc->free();
<!-- end quote -->


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-10 14:02 UTC] cweismann at ea dot com
corrected version number
 [2008-07-26 11:25 UTC] bjori@php.net
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 Apr 18 00:01:28 2024 UTC