Absolute Garbage

Absolute Garbage
php-memes, python-memes, javascript-memes, cpp-memes, syntax-memes | ProgrammerHumor.io

When you've been writing code for more than five minutes, you develop strong opinions about loop syntax. Python's clean for item in list: brings pure serenity. JavaScript's modern for (let item of list) and C++'s elegant for (auto& item : list) also get a nod of approval.

But PHP's foreach ($list as $item)? That backwards syntax where the collection comes before the variable just feels... wrong. It's like reading a sentence in Yoda's voice. The dollar signs everywhere don't help either. Sure, it works fine, but so does a rusty spoon as a screwdriver.

Every language has that one syntax decision that makes you wonder what the designers were thinking during that meeting.

More Like This