How many times you wrote code like this to achieve a simple purpose? Mapping values of an array: $result = []; foreach ($items as $key => $item) { $result[$key] = func($item); } Filtering: $result = []; foreach ($items as $key => $item) { if (condition($item)) { $result[$key] = $item; } } Or reducing an array to some value: $acc = 0; foreach ($numbers as $number) { $acc += $number; } The above cod
![Refactor your code to functional style with PhpStorm 2018.1 | The PhpStorm Blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/dd9d812853b9b187dc1f9ab3d4327387dac0b895/height=288;version=1;width=512/https%3A%2F%2Fblog.jetbrains.com%2Fwp-content%2Fuploads%2F2019%2F02%2Fphpstorm_social.png)