Re: [RFC] Pipe Operator
| From: | lester at lsces dot co dot uk | Date: | Sat, 30 Apr 2016 18:41:29 +0000 |
| Subject: | Re: [RFC] Pipe Operator | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92998@lists.php.net to get a copy of this message | ||
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 handling the empty array rather than a null return just means having to remember what you do use
:(
Sent from my android device so quoting is crap ... need to kill these painful email clients!
-----Original Message-----
From: lester@lsces.co.uk
To: internals@lists.php.net, Larry Garfield <larry@garfieldtech.com>
Sent: Sat, 30 Apr 2016 19:35
Subject: Re: [PHP-DEV] [RFC] Pipe Operator
However,
passing an array to array_filter() then passing the result to
array_map() is always type safe (because array_filter still returns an
array even if it filters down to 0 items), and array_map on an empty
array is essentially a no-op, so I'm comfortable doing so, and wish I
could do so more often with less fugly syntax. :-)