PHP aaaaarrrrrggggghhhhhh

Things I hate about PHP No. 512 (notwithstanding the fact that in comparison to many other things I like PHP):

Inconsistency in parameter ordering

Say I want to find a small thing in a big thing, like a piece of a string in a bigger string. I can use strpos and you pass in the string you’re looking in first, and the string you want to find second. So strpos(“PHP aaaarrrgggh”,”PHP”) returns 0 (or false, unless you’re using ===, but I’m sure that’s been ranted about enough).

But if I want to find, for example, a key in an array I pass in the key I’m looking for first and the thing to look in second. So I have to remember the exact syntax of every single miniscule stupid little command and which order to pass parameters in because there’s absolutely no consistency.

Advertisements
This entry was posted in PHP, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s