Doc #65390 [Opn->Csd]: default argument of htmlentities() wrong in function signature in documentation
| From: | l dot felber at gmx dot ch | Date: | Tue, 06 Aug 2013 07:19:01 +0000 |
| Subject: | Doc #65390 [Opn->Csd]: 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-10141@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
User updated by: l dot felber at gmx dot ch
Reported by: l dot felber at gmx dot ch
Summary: default argument of htmlentities() wrong in function
signature in documentation
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: *Unicode Issues
-PHP Version: 5.5.1
+PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
You're right. The only problem (or my problem) seems to be that one cannot see
the old default values in the method signature. There's probably not much one can
do against this (expect upgrading php version, which in my case, I currently
can't). I'm closing the ticket becuase of that.
Previous Comments:
------------------------------------------------------------------------
[2013-08-05 13:38:24] cmbecker69 at gmx dot de
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).
------------------------------------------------------------------------
[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