EAP 2018.1 will include loop refactoring to use SPL array_* functions. Nice! Refactor your code to functional style with PhpStorm 2018.1