It will have a performance hit as you're using functional methods instead of modifying arrays inplace.
Anyway, does the performance hit matters?, I been using Laravel for years, I haven written traditionals-for-loops in a while, and, if any time in the future your app has a performance problem, you can pay 10 extra dollars to add an extra server.
Your development time is way more expensive than some CPU.
If you find collections easier to maintain and test (I do), then it completely worth it.
It's fair enough if a website has, for example, 500 users per day. What about a million or more? I am not sure that the 10 dollars you set aside for ice cream will be enough.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It will have a performance hit as you're using functional methods instead of modifying arrays inplace.
Anyway, does the performance hit matters?, I been using Laravel for years, I haven written traditionals-for-loops in a while, and, if any time in the future your app has a performance problem, you can pay 10 extra dollars to add an extra server.
Your development time is way more expensive than some CPU.
If you find collections easier to maintain and test (I do), then it completely worth it.
Tradeoffs as always but i guess if the performance hit isn't so noticeable then maintainable code is a no brainer.
It's fair enough if a website has, for example, 500 users per day. What about a million or more? I am not sure that the 10 dollars you set aside for ice cream will be enough.