php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27574 Bugs in example 2 of xml documentation
Submitted: 2004-03-11 12:44 UTC Modified: 2004-03-12 10:07 UTC
From: stevenv at optonline dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2004-03-11 12:44 UTC] stevenv at optonline dot net
Description:
------------
There are two similar problems in the functions startElement() and endElement() in example 2 on <http://us2.php.net/xml>.

1) $htmltag, which springs into existence out of nowhere, is being used in a comparison. I think it was meant to be $name rather than $htmltag.

2) I think the following lines:

   if ($htmltag == $map_array[$name]) {
       echo "<$htmltag>";

should be:

   if ( isset($map_array[$name]) ) {
       echo "<$map_array[$name]>";

Otherwise the output will be identical to the input (no conversion).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-12 10:07 UTC] nlopess@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:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=f83c11ceea658a4325af014a337844e3d502befa
Log: fix #27574
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 21 04:00:02 2025 UTC