Doc #61578 [NEW]: bin2hex() definition is ambiguous
| From: | unsure at tactileint dot com | Date: | Sat, 31 Mar 2012 02:25:39 +0000 |
| Subject: | Doc #61578 [NEW]: bin2hex() definition is ambiguous | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-8140@lists.php.net to get a copy of this message | ||
From:
Operating system: any
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:bin2hex() definition is ambiguous
Description:
------------
---
From manual page:
http://www.php.net/function.bin2hex#refsect1-function.bin2hex-description
---
"Returns an ASCII string containing the hexadecimal representation of str.
The conversion is done byte-wise with the high-nibble first. "
ambiguous. Which you mean?
'01101000' => '68' first nibble, 6, is higher order, 0110
or
'0110' => '30313130' first nibble, 3, is higher order in char '0'
= 30
In both cases the input string is 'binary'. Given that '123ABC' is
considered headecimal, doesn't it follow that '01101000' is binary?
Including a few unambiguous examples would solve the problem. Like:
bin2hex('or') => '6f72'
--
Edit bug report at https://bugs.php.net/bug.php?id=61578&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61578&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61578&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61578&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61578&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61578&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61578&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61578&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61578&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61578&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61578&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61578&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61578&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61578&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61578&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61578&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61578&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61578&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61578&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61578&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61578&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61578&r=mysqlcfg