RE: [PHP-DEV] ord() on binary strings

2005-09-14 Thread Tex Texin
: Friday, September 09, 2005 7:37 AM > To: 'Andrei Zmievski'; 'Derick Rethans' > Cc: 'Andi Gutmans'; 'PHP Developers Mailing List' > Subject: RE: [PHP-DEV] ord() on binary strings > > > I don't see any problems with ord() for binary data

RE: [PHP-DEV] ord() on binary strings

2005-09-09 Thread Dmitry Stogov
; Sent: Friday, September 09, 2005 5:42 PM > To: Derick Rethans > Cc: Andi Gutmans; PHP Developers Mailing List > Subject: Re: [PHP-DEV] ord() on binary strings > > > My argument was that ord() semantics and docs say that it works on > _characters_ and this simply

Re: [PHP-DEV] ord() on binary strings

2005-09-09 Thread Ilia Alshanetsky
Andrei Zmievski wrote: > My argument was that ord() semantics and docs say that it works on > _characters_ and this simply does not make sense for the binary > strings. If we really want ord() to work on binary type, fine, but we'd > better have docs that make sense then. IMHO the docs say char

Re: [PHP-DEV] ord() on binary strings

2005-09-09 Thread Andrei Zmievski
My argument was that ord() semantics and docs say that it works on _characters_ and this simply does not make sense for the binary strings. If we really want ord() to work on binary type, fine, but we'd better have docs that make sense then. -Andrei On Sep 9, 2005, at 12:09 AM, Derick Ret

Re: [PHP-DEV] ord() on binary strings

2005-09-09 Thread Derick Rethans
On Thu, 8 Sep 2005, Andi Gutmans wrote: > Did Andrei have a reason besides the docs? Even without IS_UNICODE/IS_BINARY > it sounds like the docs could use tuning anyway, no? Andrei: The docs say "Return ASCII value of character", which doesn't make sense for binary. You can use bin2hex()

Re: [PHP-DEV] ord() on binary strings

2005-09-09 Thread Derick Rethans
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. I

Re: [PHP-DEV] ord() on binary strings

2005-09-08 Thread Andi Gutmans
Did Andrei have a reason besides the docs? Even without IS_UNICODE/IS_BINARY it sounds like the docs could use tuning anyway, no? Andi At 12:55 PM 9/8/2005, Derick Rethans wrote: Hei, I committed a patch to make ord() work on IS_BINARY strings earlier today (http://news.php.net/php.cvs/33862)

Re: [PHP-DEV] ord() on binary strings

2005-09-08 Thread Ilia Alshanetsky
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. Ilia -- PHP Internals - PHP Runtime Development Mail

[PHP-DEV] ord() on binary strings

2005-09-08 Thread Derick Rethans
Hei, I committed a patch to make ord() work on IS_BINARY strings earlier today (http://news.php.net/php.cvs/33862). Andrei doesn't like that because the description in the docs says "ord -- Return ASCII value of character", which in his opinion doesn't make much sense for binary strings. Other