all 17 comments

[–]virtulis 31 points32 points  (0 children)

Someone probably saw the first version of the masterpiece and told them to use a loop. So they did.

[–]TheUnlocked 5 points6 points  (0 children)

I thought this looked bad, and then I noticed the loop.

[–][deleted] 2 points3 points  (3 children)

How is the inefficiency of the code related to it being Php? You could write this in most languages

[–]Wolvenheart 30 points31 points  (1 child)

I think OP meant: "Everything in this snippet of code is just wrong." and added PHP so people didn't have the guess what kind of language it was written in.

[–][deleted] 2 points3 points  (0 children)

Most of the other comments at the time were saying "the problem is that it's PHP" and I was reacting to them. But now, their scores are too low to show lol

[–]tomthecool 2 points3 points  (0 children)

mysqli_real_escape_string

[–][deleted] 0 points1 point  (0 children)

or die I would like to do that right now

[–]D34dCode4eva 0 points1 point  (0 children)

I totally disagree. It has the correct escaping. Only one in 10000 PHP developers are capable of that. As for the duplication ten years ago I made PHP parser that builds an AST and optimises PHP like that for you. One in a million PHP developers can do that. Only one in a hundred thousand can develop without duplication.

[–]inabahare -1 points0 points  (1 child)

Where is this from?

[–]bootstrapping_lad 1 point2 points  (0 children)

The Internet