php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49140 Bad coding practice in example code
Submitted: 2009-08-03 13:18 UTC Modified: 2009-08-03 21:14 UTC
From: zerobot at web dot de Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2009-08-03 13:18 UTC] zerobot at web dot de
Description:
------------
Example code on the manpage function.libxml-use-internal-errors should not call DOMDocument::load statically since this is considered bad practice (according to manpage domdocument.load). Instead the example code should read something like this:

  $doc = new DOMDocument();
  $doc->load('file.xml');



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-03 21:14 UTC] svn@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=286768
Log: Fixed bug #49140 (Bad coding practice in example code)
 [2009-08-03 21:14 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=8b9093186a5f99c18fd46b7e719982f05b0ce513
Log: Fixed bug #49140 (Bad coding practice in example code)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 00:00:02 2026 UTC