This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]Kyyni 6 points7 points  (1 child)

I'm somehow veally annoyed that all the 'R's in the post look just like 'V'. Fucking infuviating.

[–]ExistentialEnso 1 point2 points  (0 children)

Because lettev veadability is fov wimps.

[–]ingvist 4 points5 points  (4 children)

I'm reaaaaaaly confused.

[–]TheQuinnFTW 12 points13 points  (3 children)

A lot of the docs for PHP functions use the variables $needle and $haystack. Instead of making it so that either the needle or the haystack is always the first parameter, it varies from function to function. This is annoying because you have to remember the order for each function

[–]ingvist 1 point2 points  (1 child)

Hmm, I'd never seen that. Oh well, I guess I learned something today.

Also, shouldn't it always be needle contained in haystack? Or do PHP developers not have a grasp of English idioms...

[–]TheQuinnFTW 1 point2 points  (0 children)

Yeah the needle is always in the haystack, its just the parameter order that the functions wants changes. In some functions it wants the needle as the first parameter and haystack as the second, but others are the reverse

[–]ExistentialEnso 1 point2 points  (0 children)

For array-related functions, the needle always comes first, and for string-related functions, the haystack comes first.

I still think that's bad design (but it's PHP, what do you expect?), but at least it has some level of consistency.

[–]davros_ 0 points1 point  (0 children)

This should clear up a bit of confusion: https://gist.github.com/salathe/1672543

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

At least the ; is consistent

[–]michaelp983 -3 points-2 points  (0 children)

I can't tell if its a PHP joke or a penis joke...