Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-02 Thread Sara Golemon
On Mon, May 2, 2016 at 5:57 PM, Stephen Coakley wrote: > Could you use a closure instead to accomplish this? (Again yes, Sara could > you clarify if this is permitted?) > > $ret = scandir($arg) > |> array_filter($$, function($x) { return $x !== '.' && $x != '..'; > }) > |> array_ma

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-02 Thread Terry Cullen
On 3 May 2016 at 10:57, Stephen Coakley wrote: > On 04/30/2016 06:14 PM, Rowan Collins wrote: > >> On 29/04/2016 20:58, Sara Golemon wrote: >> Let's say I want to add a condition just before getFileArg(); with the >> current version I've got to: >> - go to the beginning of the chain, and assign t

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-02 Thread Stephen Coakley
On 04/30/2016 06:14 PM, Rowan Collins wrote: On 29/04/2016 20:58, Sara Golemon wrote: Let's say I want to add a condition just before getFileArg(); with the current version I've got to: - go to the beginning of the chain, and assign to something other than $ret - go to where I want to break the c

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-02 Thread Stephen Coakley
On 04/30/2016 01:05 PM, Larry Garfield wrote: On 04/29/2016 07:19 PM, Stanislav Malyshev wrote: In a way... Sara, this syntax feels like it's only one step removed from promises; if any of the chained steps involve IO, it becomes basically what promises are for. Am I barking down the wrong tree,

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-02 Thread Sara Golemon
On Mon, May 2, 2016 at 12:56 AM, Michael Wallner wrote: > On 30/04/16 20:57, Sara Golemon wrote: >> What follows is a terrible idea and I don't mean to propose it as a >> solution, but to spark further conversation: >> >> $result = getData() >> ?> doStuffWith($$) > > I thought this was the "PHP,

Re: [PHP-DEV] Idea for PHP v7.x: Shared Opcode Cache

2016-05-02 Thread Mikael Lyngvig
Ok, thanks for the clarification :-) I guess an opcode cache server of some sort would be the only way to do this, listening either on a Unix socket og a TCP/IP socket. Probably not worth it anyway. I'm going to leave the list again as I just wanted to share my "brilliant" idea with you guys :-)

Re: [PHP-DEV] Idea for PHP v7.x: Shared Opcode Cache

2016-05-02 Thread Joe Watkins
Morning Mikeal, The memory that opcache uses is anonymously mapped shared memory, this cannot be shared across distinct processes, it is not backed by any file. Even if you were to back the memory with a file, the most efficient synchronization primitives that exists cannot be shared across

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-02 Thread Michael Wallner
On 30/04/16 20:57, Sara Golemon wrote: > On Sat, Apr 30, 2016 at 11:41 AM, wrote: >> God I hate crap software ... TRYING to reply without top post ... but >> Samsung is incapable! >> >> What I was trying to comment on was that trapping that no result is returned >> may be what is needed, so han