Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-21 Thread Gustavo Lopes
First, I'd like to announce the native implementation is available on github: https://github.com/cataphract/php-src/compare/array_part Please review this feature BEFORE voting starts. Unless something comes up that has to be dealt with until then, I want to start voting on Monday, 28th May

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Gustavo Lopes
On Mon, 14 May 2012 15:41:25 +0200, Paul Dragoonis wrote: Gustavo, why would I use array_part() if I could use array_slice() to get the parts of an array between two offsets. Obviously, if you want to do something that array_slice() already does, then you wouldn't have a lot of pressing

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Paul Dragoonis
On Mon, May 14, 2012 at 2:01 PM, Pierre Joye wrote: > hi Gustavo, > > I would add some examples inline in the RFC, with explanation, to ease > the comprehension of this new function and its possibility. The > current RFC is somehow hard to digest :) > Yes, that's what I was meaning earlier but w

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Pierre Joye
hi Gustavo, I would add some examples inline in the RFC, with explanation, to ease the comprehension of this new function and its possibility. The current RFC is somehow hard to digest :) Cheers, On Mon, May 14, 2012 at 1:39 PM, Gustavo Lopes wrote: > On Mon, 14 May 2012 13:23:27 +0200, Paul D

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Gustavo Lopes
On Mon, 14 May 2012 13:23:27 +0200, Paul Dragoonis wrote: Am i correct in assuming this is basically substr() for arrays. No. That's a part of it. It also does indexes as keys (like array_slice) and multidimensional arrays, none of which have anything analogous in strings. -- Gustavo

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Paul Dragoonis
Hey, Am i correct in assuming this is basically substr() for arrays. On Mon, May 14, 2012 at 11:29 AM, Gustavo Lopes wrote: > On Mon, 14 May 2012 12:26:11 +0200, Paul Dragoonis > wrote: > > Can you please add some code examples on the RFC, that get outputted as >> tags. >> >> Ideally demonstr

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Gustavo Lopes
On Mon, 14 May 2012 12:26:11 +0200, Paul Dragoonis wrote: Can you please add some code examples on the RFC, that get outputted as tags. Ideally demonstrating var_dump() output to inspect the return value of your new function to get a clear indication of the input, and resulting output.

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Paul Dragoonis
Can you please add some code examples on the RFC, that get outputted as tags. Ideally demonstrating var_dump() output to inspect the return value of your new function to get a clear indication of the input, and resulting output. - Paul. On Mon, May 14, 2012 at 11:21 AM, Gustavo Lopes wrote: >

[PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-14 Thread Gustavo Lopes
Hi I have a proposal to add a new function to ext/standard: array_part(): https://wiki.php.net/rfc/array_part Comments would be very welcome, especially the constructive kind. Please keep this on topic. In particular, avoid proposing new syntax as I'm not interested in that. You can of cours