Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Does it make sense to use array_map, array_filter, array_key_exists?

I do not use these functions normally, I can do this with foreach loops. My code is simple to ready, some foreachs, ifs (I try to avoid else) and empty functions. But when I take a look at symfony core, phpunit source code etc. there is a extense use of php array functions.

But when I take a look at array_map vs foreach performance test, foreach often wins. So why? Is there also a performance reason to write "\" infront of each php functions when you use namespaces? like \array_walk() ...?

Comments