Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Lester Caine
Stanislav Malyshev wrote: Hi! What I am probably asking is what was the brick wall PHP6 hit. I was under the impression that there was no agreement on 'switchable or only' to unicode core? ( And those who did write PHP6 books seemed to have their own views on which way the discussions would go

[PHP-DEV] XML binding mapping library

2010-03-16 Thread John
Hello, people. I am looking for community feedback about my ideas for XML binding persistence library: XML binding persistence library Description: object-oriented library for mapping XML file structure, binding to PHP 5 class. Library would provide functionality for using XML based entity

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread dreamcat four
On Tue, Mar 16, 2010 at 8:30 AM, Lester Caine les...@lsces.co.uk wrote: '3' is not a very processor friendly number, so working with 4 even though wasteful on memory, does make perfect sense. How long is it since we had a 640k limit on working memory? SERVERS should have a good amount of memory

Re: [PHP-DEV] XML binding mapping library

2010-03-16 Thread Alexey Zakhlestin
On 16.03.2010, at 10:46, John wrote: Hello, people. I am looking for community feedback about my ideas for XML binding persistence library: skip… Are you thinking about implementing it as some kind of extension? or about php-code? or just reusable C-library with bindings for PHP? -- PHP

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Andrey Hristov
dreamcat four wrote: On Tue, Mar 16, 2010 at 8:30 AM, Lester Caine les...@lsces.co.uk wrote: '3' is not a very processor friendly number, so working with 4 even though wasteful on memory, does make perfect sense. How long is it since we had a 640k limit on working memory? SERVERS should have a

[PHP-DEV] array_seek function

2010-03-16 Thread Felix De Vliegher
Hi all I recently needed seek functionality in arrays, and couldn't find it in the regular set of array functions, so I wrote a function for it. (Seek = getting an array value based on the position (or offset, if you want to call it like that), and not the key of the item) Basically you can

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Pierre Joye
hi Felix, Not sure about the usefulness of this function but the name is misleading (pls reattach the patch as .txt while being at it :). Does it set the position (_seek) or does it return the value of a given position (_get_pos)? or both (no idea :)? Cheers, Cheers, On Tue, Mar 16, 2010 at

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Felix De Vliegher
Hi Pierre Right now, it returns the value of a given position. In that case, array_get_pos might be a better name. Oh, and I attached the patch with .txt extension :) Greetings, Felix Index: ext/standard/array.c === ---

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Richard Quadling
On 16 March 2010 13:30, Felix De Vliegher felix.devlieg...@gmail.com wrote: Hi all I recently needed seek functionality in arrays, and couldn't find it in the regular set of array functions, so I wrote a function for it. (Seek = getting an array value based on the position (or offset, if

Re: [PHP-DEV] PHP 6

2010-03-16 Thread David Soria Parra
On 2010-03-13, Lukas Kahwe Smith m...@pooteeweet.org wrote: +1 As for the exact features to merge, lets first start with formulating a plan about what we want to see in the next release. I also think it makes sense to base the number and scope if the features on a rough idea of when we want

[PHP-DEV] Re: array_seek function

2010-03-16 Thread Christian Schneider
Felix De Vliegher wrote: Hi all I recently needed seek functionality in arrays, and couldn't find it in the regular set of array functions, so I wrote a function for it. Seek = getting an array value based on the position (or offset, if you want to call it like that), and not the key of the

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/

2010-03-16 Thread Hannes Magnusson
On Tue, Mar 16, 2010 at 16:45, Derick Rethans der...@php.net wrote: derick                                   Tue, 16 Mar 2010 15:45:24 + Revision: http://svn.php.net/viewvc?view=revisionrevision=296284 Log: - Moved the Unicode experiment from trunk to its own branch for reference.

[PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Derick Rethans
Hello, I've just renamed the 5.4 branch to THE_5_4_THAT_ISNT_5_4 and moved trunk to the branch FIRST_UNICODE_IMPLEMENTATION. The next things to do is to re-create trunk from PHP 5.3; I've hold off that for now, but I'd like to do the following soon: - Declare 5.2 security fixes only

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Derick Rethans
On Tue, 16 Mar 2010, Felix De Vliegher wrote: Right now, it returns the value of a given position. In that case, array_get_pos might be a better name. Oh, and I attached the patch with .txt extension :) Does it also seek the array pointer? Because I think array_seek that moves the pointer,

[PHP-DEV] Re: PHP 5.4 branch and trunk

2010-03-16 Thread David Soria Parra
On 2010-03-16, Derick Rethans der...@derickrethans.nl wrote: - Declare 5.2 security fixes only (Something for Ilia to declare). - Declare 5.3 bug fixes only (and ini-mini features if so desired) (Something for Johannes to declare). Once that's done, I'd like to: - Recreate trunk from the

Re: [PHP-DEV] Re: array_seek function

2010-03-16 Thread Mikko Koppanen
On Tue, Mar 16, 2010 at 2:12 PM, Christian Schneider cschn...@cschneid.com wrote I thinks the user space implementation function array_seek($array, $pos) {        $a = array_values($array);        return $a[$pos]; } is simple enough to not add a native function for this. It might not be

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Derick Rethans
On Tue, 16 Mar 2010, Alexey Zakhlestin wrote: On Tue, Mar 16, 2010 at 6:58 PM, Derick Rethans der...@derickrethans.nl wrote: Right now, there are the following features that I can see we should think about: - the new output buffering mechanism (I can not really see why we would  

Re: [PHP-DEV] Re: PHP 5.4 branch and trunk

2010-03-16 Thread Hannes Magnusson
On Tue, Mar 16, 2010 at 17:10, David Soria Parra s...@gmx.net wrote: On 2010-03-16, Derick Rethans der...@derickrethans.nl wrote: - Declare 5.2 security fixes only (Something for Ilia to declare). - Declare 5.3 bug fixes only (and ini-mini features if so desired)   (Something for Johannes to

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Felix De Vliegher
On 16-mrt-2010, at 17:07, Derick Rethans wrote: On Tue, 16 Mar 2010, Felix De Vliegher wrote: Right now, it returns the value of a given position. In that case, array_get_pos might be a better name. Oh, and I attached the patch with .txt extension :) Does it also seek the array

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Derick Rethans
On Tue, 16 Mar 2010, Felix De Vliegher wrote: On 16-mrt-2010, at 17:07, Derick Rethans wrote: On Tue, 16 Mar 2010, Felix De Vliegher wrote: Right now, it returns the value of a given position. In that case, array_get_pos might be a better name. Oh, and I attached the patch with

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Sebastian Bergmann
Am 16.03.2010 16:58, schrieb Derick Rethans: I've just renamed the 5.4 branch to THE_5_4_THAT_ISNT_5_4 and moved trunk to the branch FIRST_UNICODE_IMPLEMENTATION. Why do we need THE_5_4_THAT_ISNT_5_4 and trunk? trunk should be where the development happens. When the time comes for a release,

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Pierre Joye
On Tue, Mar 16, 2010 at 5:43 PM, Sebastian Bergmann s...@sebastian-bergmann.de wrote: Am 16.03.2010 16:58, schrieb Derick Rethans: I've just renamed the 5.4 branch to THE_5_4_THAT_ISNT_5_4 and moved trunk to the branch FIRST_UNICODE_IMPLEMENTATION.  Why do we need THE_5_4_THAT_ISNT_5_4

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread dreamcat four
On Tue, Mar 16, 2010 at 11:48 AM, dreamcat four dreamc...@gmail.com wrote: On Tue, Mar 16, 2010 at 8:30 AM, Lester Caine les...@lsces.co.uk wrote: '3' is not a very processor friendly number, so working with 4 even though wasteful on memory, does make perfect sense. How long is it since we had

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Mikko Koppanen
On Tue, Mar 16, 2010 at 4:22 PM, Derick Rethans der...@php.net wrote: I was also thinking, can we just make this work just like fseek (with a whence parameter) as well? (http://uk3.php.net/fseek) Hi, not sure how SEEK_END is supposed to work with arrays but here is SEEK_SET and SEEK_CUR (with

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Hannes Magnusson
On Tue, Mar 16, 2010 at 17:54, Pierre Joye pierre@gmail.com wrote: On Tue, Mar 16, 2010 at 5:43 PM, Sebastian Bergmann s...@sebastian-bergmann.de wrote: Am 16.03.2010 16:58, schrieb Derick Rethans: I've just renamed the 5.4 branch to THE_5_4_THAT_ISNT_5_4 and moved trunk to the branch

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Hannes Magnusson
On Tue, Mar 16, 2010 at 16:58, Derick Rethans der...@derickrethans.nl wrote: Before we add features, they need to be discussed whether we want to have them. Does that mean you want to take up a - strict RFC-and-after-3months-discussion-before-commit policy (i.e. killing the

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Andrey Hristov
dreamcat four wrote: On Tue, Mar 16, 2010 at 11:48 AM, dreamcat four dreamc...@gmail.com wrote: On Tue, Mar 16, 2010 at 8:30 AM, Lester Caine les...@lsces.co.uk wrote: '3' is not a very processor friendly number, so working with 4 even though wasteful on memory, does make perfect sense. How

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Rasmus Lerdorf
On 03/16/2010 10:40 AM, dreamcat four wrote: As for text files on disk, if they are unicode, they are most commonly utf-8 too. So then, why use utf-16 as internal unicode representation in Php? It doesn't really make a lot of sense for most regular people who want to use Php for their web

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Lester Caine
Rasmus Lerdorf wrote: On 03/16/2010 10:40 AM, dreamcat four wrote: As for text files on disk, if they are unicode, they are most commonly utf-8 too. So then, why use utf-16 as internal unicode representation in Php? It doesn't really make a lot of sense for most regular people who want to use

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Stanislav Malyshev
Hi! On disk storage should probably be UTF-8 without any question? Windows use of widestrings for some files simple doubles up the on disk storage As file content, it's OK (an it'd be easy to add option to specify content transformation if we wanted), but prescribing filenames as UTF-8

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread dreamcat four
On Tue, Mar 16, 2010 at 6:32 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 03/16/2010 10:40 AM, dreamcat four wrote: As for text files on disk, if they are unicode, they are most commonly utf-8 too. So then, why use utf-16 as internal unicode representation in Php? It doesn't really make a

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Pierre Joye
On Tue, Mar 16, 2010 at 7:32 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: Well, the obvious original reason is that ICU uses UTF-16 internally and the logic was that we would be going in and out of ICU to do all the various Unicode operations many more times than we would be interfacing with

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Rasmus Lerdorf
On 03/16/2010 12:05 PM, dreamcat four wrote: On Tue, Mar 16, 2010 at 6:32 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 03/16/2010 10:40 AM, dreamcat four wrote: As for text files on disk, if they are unicode, they are most commonly utf-8 too. So then, why use utf-16 as internal unicode

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Johannes Schlüter
On Tue, 2010-03-16 at 19:11 +0300, Alexey Zakhlestin wrote: + merge php-fpm branch? If we get a trunk which will be released in a foreseeable timeframe we don't need to merge this to 5.3 anymore, which had been an old plan. Tony, do you agree? johannes -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Ferenc Kovacs
On Tue, Mar 16, 2010 at 8:05 PM, Stanislav Malyshev s...@zend.com wrote: Hi! On disk storage should probably be UTF-8 without any question? Windows use of widestrings for some files simple doubles up the on disk storage As file content, it's OK (an it'd be easy to add option to specify

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Antony Dovgal
On 03/16/2010 11:00 PM, Johannes Schlüter wrote: On Tue, 2010-03-16 at 19:11 +0300, Alexey Zakhlestin wrote: + merge php-fpm branch? If we get a trunk which will be released in a foreseeable timeframe we don't need to merge this to 5.3 anymore, which had been an old plan. Tony, do you

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Stanislav Malyshev
Hi! Does that mean you want to take up a - strict RFC-and-after-3months-discussion-before-commit policy (i.e. killing the scratching-an-itch spirit of PHP) - I'm going to commit this patch tomorrow mail to internals@ (i.e. killing I need this functionality, maybe others do to spirit

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Stanislav Malyshev
Hi! Right now, it returns the value of a given position. How it's different from: array_slice() returns the sequence of elements from the array array as specified by the offset and length parameters? -- Stanislav Malyshev, Zend Software Architect s...@zend.com http://www.zend.com/

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Brian Moon
Right now, it returns the value of a given position. How it's different from: array_slice() returns the sequence of elements from the array array as specified by the offset and length parameters? array_slice returns an array of elements. This function would return the value at the given

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Lester Caine
Rasmus Lerdorf wrote: On 03/16/2010 12:05 PM, dreamcat four wrote: On Tue, Mar 16, 2010 at 6:32 PM, Rasmus Lerdorfras...@lerdorf.com wrote: On 03/16/2010 10:40 AM, dreamcat four wrote: As for text files on disk, if they are unicode, they are most commonly utf-8 too. So then, why use utf-16

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread William A. Rowe Jr.
On 3/16/2010 6:48 AM, dreamcat four wrote: Sure UTF-16 can make sense. But only if your external representations are also in UTF-16. So whats the default Unicode settings for MYSQL, POSTGRE, etc? Well, are they always set to UTF-8, or UTF-16? This is a very good point. The PHP project

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread dreamcat four
And remember, Its not just the number of times its send to ICU for conversion. Its also the number of times your UTF-16 string has to be converted back into utf-8 afterwards. This is why Apple makes its utf-16 strings immutable. So they are read-only, and the utf-8 representation can be cached

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Lukas Kahwe Smith
On 16.03.2010, at 19:23, Hannes Magnusson wrote: On Tue, Mar 16, 2010 at 16:58, Derick Rethans der...@derickrethans.nl wrote: Before we add features, they need to be discussed whether we want to have them. Does that mean you want to take up a - strict

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Lukas Kahwe Smith
On 16.03.2010, at 16:58, Derick Rethans wrote: Before we add features, they need to be discussed whether we want to have them. As version name for it I would like to use trunk-dev (and not 5.4-dev or 6.0-dev) as we're not quite sure where this is moving. Right now, there are the following

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Lukas Kahwe Smith
On 16.03.2010, at 16:58, Derick Rethans wrote: I've just renamed the 5.4 branch to THE_5_4_THAT_ISNT_5_4 and moved Eventually it should be deleted, if it helps at all in merging the OB change then it should be kept until that happens, otherwise it can be deleted now imho. The new 5.3 based

Re: [PHP-DEV] Req #51295: busyTimeout method for SQLite3

2010-03-16 Thread Joey Smith
On Sun, Mar 14, 2010 at 09:15:37AM -0400, Wez Furlong wrote: I'm sure that the docs team will add this to the manual if you ask them politely. Specifically, PDO_SQLITE defaults to a 60 second busy timeout. This can be changed by setting PDO::ATTR_TIMEOUT. The value is specified in

Re: [PHP-DEV] Where are we ACTUALLY on Unicode?

2010-03-16 Thread Ferenc Kovacs
On Tue, Mar 16, 2010 at 9:43 PM, dreamcat four dreamc...@gmail.com wrote: And remember, Its not just the number of times its send to ICU for conversion. Its also the number of times your UTF-16 string has to be converted back into utf-8 afterwards. This is why Apple makes its utf-16 strings

Re: [PHP-DEV] PHP 5.4 branch and trunk

2010-03-16 Thread Johannes Schlüter
On Tue, 2010-03-16 at 22:13 +0100, Lukas Kahwe Smith wrote: On 16.03.2010, at 16:58, Derick Rethans wrote: Before we add features, they need to be discussed whether we want to have them. As version name for it I would like to use trunk-dev (and not 5.4-dev or 6.0-dev) as we're not quite

RE: [PHP-DEV] array_seek function

2010-03-16 Thread Jared Williams
-Original Message- From: Felix De Vliegher [mailto:felix.devlieg...@gmail.com] Sent: 16 March 2010 13:31 To: PHP internals Subject: [PHP-DEV] array_seek function Hi all I recently needed seek functionality in arrays, and couldn't find it in the regular set of array

Re: [PHP-DEV] Re: array_seek function

2010-03-16 Thread Hannes Magnusson
On Tue, Mar 16, 2010 at 17:12, Mikko Koppanen mkoppa...@php.net wrote: On Tue, Mar 16, 2010 at 2:12 PM, Christian Schneider cschn...@cschneid.com wrote I thinks the user space implementation function array_seek($array, $pos) {        $a = array_values($array);        return $a[$pos]; }

Re: [PHP-DEV] array_seek function

2010-03-16 Thread Felix De Vliegher
Hi As SEEK_END only makes sense with zero or negative offsets (for arrays anyway), I've come up with an implementation for SEEK_END: http://phpbenelux.eu/array_seek.patch.txt So you can do: $arr = array('a', 'b', 'c', 'd'); echo array_seek($arr, -2, SEEK_END); // outputs 'b' echo