php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61061 mb_decode_numericentity() description is very confusing
Submitted: 2012-02-12 20:06 UTC Modified: 2021-03-18 23:41 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: matteosistisette at gmail dot com Assigned:
Status: Verified Package: mbstring related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: matteosistisette at gmail dot com
New email:
PHP Version: OS:

 

 [2012-02-12 20:06 UTC] matteosistisette at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.mb-decode-numericentity#refsect1-
function.mb-decode-numericentity-description
---

The description:
""
string mb_decode_numericentity ( string $str , array $convmap , string $encoding 
)
Convert numeric string reference of string str in a specified block to 
character.
""
is completely ununderstandable. 

First, it uses the singular "string reference [...] to character", which seems 
to suggest that the function will only convert ONE html entity into ONE 
character, which is not so (it will convert all numeric html entities in the 
given string to characters).

Second, it is not clear what "in a specified block" means.

Third, "numeric string reference of string str" is pretty confusing.

I'm not native english speaking but it looks like the person who wrote this part 
of the documentation wasn't either.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 11:55 UTC] cmb@php.net
-Package: Documentation problem +Package: mbstring related
 [2021-03-18 23:41 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2021-03-18 23:41 UTC] cmb@php.net
> Third, "numeric string reference of string str" is pretty
> confusing.

I think that should be "numeric entity references in $string".

> Second, it is not clear what "in a specified block" means.

I think that refers to the $map parameter, but wouldn't know
the details.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Apr 14 06:01:24 2021 UTC