Re: [PHP-DEV] [VOTE] voting rfc

2011-06-22 Thread Bruno CHALOPIN
On Tue, 21 Jun 2011 22:52:31 +0200, Pierre Joye wrote: We thought there was no need to over regulate this part. It is something like mentors, if you just come in, post a couple of times or daily but nobody can second you and you lead zero OSS project, then the chance that you can vote will

Re: [PHP-DEV] Changed behaviour for strtr()

2011-06-22 Thread Jordi Boggiano
On Wed, Jun 22, 2011 at 3:30 AM, Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com wrote: Right now strtr('anything', 'anything', '') === 'anything', which means that anyone relying on this behavior is doing something strange and dumb imo, doing a function call for nothing. How

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 07:24, schrieb Tomas Kuliavas: 2011.06.21 23:27 Reindl Harald rašė: i do not understand any word and miss a simple str_is_utf8() Such function uses six lines in PHP. so why do you not post them? You can write your own. no i can not as said I need locale insensitive

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Gustavo Lopes
Em Wed, 22 Jun 2011 12:14:40 +0100, Reindl Harald h.rei...@thelounge.net escreveu: Am 22.06.2011 07:24, schrieb Tomas Kuliavas: 2011.06.21 23:27 Reindl Harald rašė: i do not understand any word and miss a simple str_is_utf8() Such function uses six lines in PHP. so why do you not post

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 14:14, schrieb Gustavo Lopes: Em Wed, 22 Jun 2011 12:14:40 +0100, Reindl Harald h.rei...@thelounge.net escreveu: Am 22.06.2011 07:24, schrieb Tomas Kuliavas: 2011.06.21 23:27 Reindl Harald rašė: i do not understand any word and miss a simple str_is_utf8() Such function uses

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Kalle Sommer Nielsen
2011/6/22 Reindl Harald h.rei...@thelounge.net: WTF should this do? this won't return boolean It's an expression, so its evaluated result is a boolean hence why it makes sense -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Gustavo Lopes
Em Wed, 22 Jun 2011 13:21:10 +0100, Reindl Harald h.rei...@thelounge.net escreveu: Am 22.06.2011 14:14, schrieb Gustavo Lopes: It's actually 3 lines: function str_is_utf8($str) { return $str == || htmlspecialchars($str, 0, UTF-8); } WTF should this do? this won't return boolean

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 15:30, schrieb Gustavo Lopes: Em Wed, 22 Jun 2011 13:21:10 +0100, Reindl Harald h.rei...@thelounge.net escreveu: Am 22.06.2011 14:14, schrieb Gustavo Lopes: It's actually 3 lines: function str_is_utf8($str) { return $str == || htmlspecialchars($str, 0, UTF-8); }

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Lars Schultz
Am 22.06.2011 15:40, schrieb Reindl Harald: and why this will not return true if $str is ISO-8859-1? If you RTFM (in your jargon) you would know. http://ch.php.net/manual/en/function.htmlspecialchars.php (Return value Section) -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Anthony Ferrara
and why this will not return true if $str is ISO-8859-1? For lower 7 bit characters (code points = 127) it would return true. But if there is a single higher character (outside of ascii), it would only return true if the byte sequences follow UTF-8 semantics. So it would return false if

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 15:45, schrieb Lars Schultz: Am 22.06.2011 15:40, schrieb Reindl Harald: and why this will not return true if $str is ISO-8859-1? If you RTFM (in your jargon) you would know. http://ch.php.net/manual/en/function.htmlspecialchars.php (Return value Section) i read the

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Olivier Hill
Please change your tone. Thank you. Olivier -- http://www.olivierhill.ca/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Rasmus Lerdorf
On 06/22/2011 06:52 AM, Reindl Harald wrote: Am 22.06.2011 15:45, schrieb Lars Schultz: Am 22.06.2011 15:40, schrieb Reindl Harald: and why this will not return true if $str is ISO-8859-1? If you RTFM (in your jargon) you would know.

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 15:55, schrieb Olivier Hill: Please change your tone. Thank you the tonhe is quite correct for peopole who think a quick 3 liner will do the job of UTF8 detection which it does not and there you can read the manual as often you want signature.asc Description: OpenPGP

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 15:57, schrieb Rasmus Lerdorf: There is obviously no way to tell if hello is UTF-8 or ISO-8859-1. It is technically impossible since the two are identical in that range. yes and so this will not work and as long PHP has on million places troubles with UTF8 it would be hardly

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Rasmus Lerdorf
On 06/22/2011 07:01 AM, Reindl Harald wrote: Am 22.06.2011 15:57, schrieb Rasmus Lerdorf: There is obviously no way to tell if hello is UTF-8 or ISO-8859-1. It is technically impossible since the two are identical in that range. yes and so this will not work and as long PHP has on

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 16:06, schrieb Rasmus Lerdorf: On 06/22/2011 07:01 AM, Reindl Harald wrote: Am 22.06.2011 15:57, schrieb Rasmus Lerdorf: There is obviously no way to tell if hello is UTF-8 or ISO-8859-1. It is technically impossible since the two are identical in that range. yes and so

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Ferenc Kovacs
On Wed, Jun 22, 2011 at 4:08 PM, Reindl Harald h.rei...@thelounge.netwrote: Am 22.06.2011 16:06, schrieb Rasmus Lerdorf: On 06/22/2011 07:01 AM, Reindl Harald wrote: Am 22.06.2011 15:57, schrieb Rasmus Lerdorf: There is obviously no way to tell if hello is UTF-8 or ISO-8859-1. It

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
Am 22.06.2011 16:49, schrieb Ferenc Kovacs: after 10 years i want solutions where it is not the road to hell using any string function on user-input and since PHP6 seems to be quite dead it feels there will never be a trustable solution you made my day. boy :) after fetch a

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Ferenc Kovacs
On Wed, Jun 22, 2011 at 4:52 PM, Reindl Harald h.rei...@thelounge.netwrote: Am 22.06.2011 16:49, schrieb Ferenc Kovacs: after 10 years i want solutions where it is not the road to hell using any string function on user-input and since PHP6 seems to be quite dead it feels

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Robert Eisele
1. The number of CHARs isn't unrelevant in a general manner. It depents on the application, even if the trend goes towards UTF8 for websites. 2. Within 10 years, you could have come to a working solution which could please us all. 3. Stop flaming and focus on your other day-job instead.

[PHP-DEV] Scope change on rebinding of closure objects

2011-06-22 Thread Gustavo Lopes
I'd like to resubmit my change proposal on the rebinding of closures. The proposal is explained here: https://wiki.php.net/rfc/closures/object-extension#privateprotected_members_scope I also took the liberty of adding it to the 5.4 todo list page on the wiki. -- Gustavo Lopes -- PHP

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Reindl Harald
FIRST: it is terrible that one post in HTML, the next ansers on top and other answering on bottom in the same thread and that the most do not undertsand reply to the list address is enough Am 22.06.2011 17:07, schrieb Robert Eisele: 1. The number of CHARs isn't unrelevant in a general manner

RE: [PHP-DEV] foreach() for strings

2011-06-22 Thread Jonathan Bond-Caron
On Wed Jun 22 11:25 AM, Reindl Harald wrote: and php as primary web-language is missing UTF8 support in the core You have a valid point. Now onto foreach() for strings, any other opinions? Seems like the discussion is closed and most likely should move to a RFC with some consideration about

Re: [PHP-DEV] foreach() for strings

2011-06-22 Thread Tomas Kuliavas
2011.06.22 14:14 Reindl Harald rašė: Am 22.06.2011 07:24, schrieb Tomas Kuliavas: 2011.06.21 23:27 Reindl Harald rašė: i do not understand any word and miss a simple str_is_utf8() Such function uses six lines in PHP. so why do you not post them? My lines are not public domain. They are