Re: ord() on binary strings
| From: | Derick Rethans | Date: | Fri, 09 Sep 2005 07:02:14 +0000 |
| Subject: | Re: ord() on binary strings | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18734@lists.php.net to get a copy of this message | ||
On Thu, 8 Sep 2005, Ilia Alshanetsky wrote:
> It makes perfect sense to me that ord() would work on binary strings.
> When we return an ASCII value we don't limit the range returned, it can
> be 1 or 255. So, I see no reason to cripple this function and prevent it
> from working on binary data.
Indeed, the only thing is that you can't really talk about "ASCII"
values, as binary data doesn't really have an encoding (and certainly
not ascii as that's 7bits only). But IMO that's something to tune in the
docs.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org