Doc #65390 [Com]: default argument of htmlentities() wrong in function signature in documentation
| From: | cmbecker69 at gmx dot de | Date: | Mon, 05 Aug 2013 13:38:24 +0000 |
| Subject: | Doc #65390 [Com]: default argument of htmlentities() wrong in function signature in documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10139@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65390&edit=1
ID: 65390
Comment by: cmbecker69 at gmx dot de
Reported by: l dot felber at gmx dot ch
Summary: default argument of htmlentities() wrong in function
signature in documentation
Status: Open
Type: Documentation Problem
Package: *Unicode Issues
PHP Version: 5.5.1
Block user comment: N
Private report: N
New Comment:
The documentation on the encoding parameter states:
| Like htmlspecialchars(), htmlentities() takes an optional
| third argument /encoding/ which defines encoding used in
| conversion. If omitted, the default value for this argument
| is ISO-8859-1 in versions of PHP prior to 5.4.0, and UTF-8
| from PHP 5.4.0 onwards.
From the function changelog:
| 5.4.0 The default value for the encoding parameter was
| changed to UTF-8.
This is up-to-date in the German and French translation,
but not in the *Italian* translation.
The documentation is correct, that $encoding defaults
to UTF-8 (verified for PHP 5.4.7, 5.4.13 and 5.5.0RC2).
Previous Comments:
------------------------------------------------------------------------
[2013-08-05 09:22:49] l dot felber at gmx dot ch
Description:
------------
---
From manual page: http://www.php.net/function.htmlentities#refsect1-
function.htmlentities-description
---
There is no actual bug, but the documentation on
http://www.php.net/manual/en/function.htmlentities
is inconsistent:
The default value of the $encoding parameter of the htmlentities function is in
the signature on top 'UTF-8' and in the encoding-parameter description 'ISO-8859-
1' (which seems to be the actual default)
Expected result:
----------------
Default value should be shown as 'ISO-8859-1' in function signature.
Well actually you should change the default in the implementation to 'UTF-8' (and
maybe completely remove all support for all other encodings), but thats probably
another issue ;-P
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65390&edit=1