[PHP-DEV] enhance fget to accept a callback

2014-11-23 Thread Bill Salak
Hi list, I'm considering writing an RFC to add a 3rd parameter to fgets which accepts a user defined function. If we had this today we wouldn't need fgetcsv with the added benefit of fgetcsv style support for data packaging formats we would otherwise create more 1 off functions for. For exampl

Re: [PHP-DEV] enhance fget to accept a callback

2014-11-23 Thread Rowan Collins
On 23 November 2014 18:39:18 GMT, Bill Salak wrote: >Hi list, > > > >I'm considering writing an RFC to add a 3rd parameter to fgets which >accepts >a user defined function. If we had this today we wouldn't need fgetcsv >with >the added benefit of fgetcsv style support for data packaging formats >

Re: [PHP-DEV] [RFC] Additional splat operator usage

2014-11-23 Thread S.A.N
I always wanted to have an analog XPath to access the array elements. Something like: ['p' => ['a' => ['t' => ['h' => 'value']; $xpath = ['x', 'p', 'a', 't', 'h']; $value = $array[...$xpath]; var_dump($value); // string(5) "value" ?> This is certainly a topic for another RFC, but this func

Re: [PHP-DEV] [RFC] Additional splat operator usage

2014-11-23 Thread Andrea Faulds
> On 23 Nov 2014, at 23:07, S.A.N wrote: > > I always wanted to have an analog XPath to access the array elements. > Something like: > > > $array = ['x' => ['p' => ['a' => ['t' => ['h' => 'value']; > $xpath = ['x', 'p', 'a', 't', 'h']; > $value = $array[...$xpath]; > > var_dump($value);

RE: [PHP-DEV] enhance fget to accept a callback

2014-11-23 Thread Bill Salak
>Hi list, > >I'm considering writing an RFC to add a 3rd parameter to fgets which >accepts a user defined function. If we had this today we wouldn't need >fgetcsv with the added benefit of fgetcsv style support for data >packaging formats we would otherwise create more 1 off functions for. >Fo

Re: [PHP-DEV] [RFC] Additional splat operator usage

2014-11-23 Thread S.A.N
> > > That would be quite confusing, we don’t allow $array[‘x’, ‘p’, ‘a’, ’t’, > ‘h’] just now. > Andrea Faulds > Yes, I know, but it would be convenient, maybe someone will offer the best option syntax.

[PHP-DEV] Zend Engine 3

2014-11-23 Thread Andrea Faulds
Good evening, Since phpng, int64, and perhaps other future changes in PHP 7 are a pretty big change, I think we ought to bump the major version number of the Zend Engine, from Zend Engine 2 to Zend Engine 3. I have a pull request open which would do this, although it needs updating to correct

Re: [PHP-DEV] Zend Engine 3

2014-11-23 Thread Stanislav Malyshev
Hi! > Since phpng, int64, and perhaps other future changes in PHP 7 are a > pretty big change, I think we ought to bump the major version number > of the Zend Engine, from Zend Engine 2 to Zend Engine 3. I agree, with all work on the engine being done, and new PHP major, I think it makes sense to

Re: [PHP-DEV] enhance fget to accept a callback

2014-11-23 Thread Tjerk Meesters
Hi! > On 24 Nov 2014, at 02:39, Bill Salak wrote: > > Hi list, > > > > I'm considering writing an RFC to add a 3rd parameter to fgets which accepts > a user defined function. If we had this today we wouldn't need fgetcsv with > the added benefit of fgetcsv style support for data packaging for

Re: [PHP-DEV] [RFC] Additional splat operator usage

2014-11-23 Thread Marcio Almada
> I always wanted to have an analog XPath to access the array elements. > Something like: > $array = ['x' => ['p' => ['a' => ['t' => ['h' => 'value']; > $xpath = ['x', 'p', 'a', 't', 'h']; > $value = $array[...$xpath]; > var_dump($value); // string(5) "value" > ?> What would happen if some k

Re: [PHP-DEV] [RFC] Additional splat operator usage

2014-11-23 Thread S.A.N
What would happen if some key from `$xpath` is undefined on the > multidimensional `$array`? > Notice: Undefined index... Return NULL.

Re: [PHP-DEV] Zend Engine 3

2014-11-23 Thread Xinchen Hui
Hey: On Mon, Nov 24, 2014 at 8:10 AM, Andrea Faulds wrote: > Good evening, > > Since phpng, int64, and perhaps other future changes in PHP 7 are a pretty > big change, I think we ought to bump the major version number of the Zend > Engine, from Zend Engine 2 to Zend Engine 3. > > I have a pull

Re: [PHP-DEV] Zend Engine 3

2014-11-23 Thread Stanislav Malyshev
Hi! > I can not guarantee engine won't change anymore, (like your bigint > patch or something else)... But having ZEND_ENGINE_3 is no guarantee it won't change anymore. It just something that people can start to use now for changes that already happened. -- Stas Malyshev smalys...@gmail.com --