Remove array_walk (#37392)
Remove array_walk (#37392)

It is enough for the use case to just use a simple PHP block `{ }` for this method.

Replacing the array_walk with a simple foreach loop gains:

- Code Clarity
- Performance (might be negligible, but not a trade either)

In short, PHP blocks are faster than calling functions.
The cost of array_walk goes up by the number of providers registered in the application.

More info can be found at: https://www.reddit.com/r/PHP/comments/aurlqt/ive_been_messing_around_with_the_array_walk/ehbbh76
notebowl/laravel-framework,lucasmichot/framework,leo108/laravel_framework,arturock/framework,dwightwatson/framework,bytestream/framework,mul14/laravel-framework,morrislaptop/framework,laravel/framework,arturock/framework,hafezdivandari/framework,laravel/framework,crynobone/framework,mul14/laravel-framework,mul14/laravel-framework,tomschlick/framework,dwightwatson/framework,stevebauman/framework,driesvints/framework,driesvints/framework,JamesForks/framework,samlev/framework,leo108/laravel_framework,JamesForks/framework,morrislaptop/framework,arturock/framework,tomschlick/framework,stevebauman/framework,hafezdivandari/framework,notebowl/laravel-framework,lucasmichot/framework,mul14/laravel-framework,tomschlick/framework,bytestream/framework,crynobone/framework,samlev/framework