Re: A little syntactic sugar on array_* function calls?
| From: | someniatko | Date: | Tue, 25 May 2021 10:05:00 +0000 |
| Subject: | Re: A little syntactic sugar on array_* function calls? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114572@lists.php.net to get a copy of this message | ||
> I was wondering whether $array->map($somefunction) would be possible.
There is Pipe Operator RFC existing already, which most probably would
suit your needs. The code you want will look like this:
https://wiki.php.net/rfc/pipe-operator-v2
```php
$array |> array_map($somefunction).
```
Best wishes,
someniatko