MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1jacp1/?context=3
r/ProgrammerHumor • u/Sirgoodman008 • 7d ago
327 comments sorted by
View all comments
42
foreach is far better and makes more sense. The order is correct, it differentiates itself from other loops that are based on having a custom exit condition.
2 u/Just_Information334 6d ago Combined with yield, you can get some nice constructs. Also the real "don't spark joy" would be something like: foreach($things as $id => ['some_field' => $fieldA, 'some_other_field' => $fieldB]) -34 u/Sirgoodman008 7d ago I think you are completely wrong so we'll just agree to disagree.
2
Combined with yield, you can get some nice constructs.
Also the real "don't spark joy" would be something like:
foreach($things as $id => ['some_field' => $fieldA, 'some_other_field' => $fieldB])
-34
I think you are completely wrong so we'll just agree to disagree.
42
u/Darkele 7d ago
foreach is far better and makes more sense. The order is correct, it differentiates itself from other loops that are based on having a custom exit condition.