I think the only good thing about PHP being my first programming language is that to this day, when learning a new language, I am pleasantly surprised by how logical and feature-rich and generally not-PHP-like they are.
When your standards are set that low, it’s hard to take things like halfway decent language design for granted.
Okay, that might not be a good thing after all.
My personal favorite PHP inconsistency is in search functions. I have to look this up every time I need to check whether something is contained in a string or array, because, well, I’ll let the documentation speak for itself:
int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )
bool in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] )
For the non-programmers who are still confused, look at the positions of ‘needle’ (the thing being searched for) and ‘haystack’ (the thing being searched within) in the above two functions.
-
mac-cosmetics-offer-code-2012 reblogged this from jacob
-
waschmaschinen-2012 reblogged this from jacob
-
wahnbr1efe liked this
-
festplattenrecorder-test-2012 reblogged this from jacob
-
dirty-pick-up-lines reblogged this from jacob
-
tamivendu reblogged this from jacob
-
buzzingphones reblogged this from jacob and added:
How does one fail to shuffle?
-
codeman38 reblogged this from danyet and added:
My personal favorite...in search functions. I have...check...
-
pakislash reblogged this from jacob
-
saltcod reblogged this from jacob and added:
Love it. PHP hatefully returns the word ‘Array’ constantly on me, but so rarely an actual array.
-
everglade reblogged this from jacob
-
nopantsnation liked this
-
jessicantesmeridiano reblogged this from jacob
-
inky liked this
-
9-bits liked this
-
danyet reblogged this from jacob and added:
I think the only good thing about PHP being my first programming language is that to this day, when learning a new...
-
nikf liked this
-
dhotson liked this
-
scottyg liked this
-
lindspanther liked this
-
nathanmanousos said:
you go php
-
phalkunz liked this
-
pukomuko liked this
-
malcolmong liked this
-
jeehdee reblogged this from jacob
-
toastr reblogged this from jacob
-
hashbang said:
parameter is address of array
-
ebriceno reblogged this from jacob
-
joggingstrollerfortoddlers liked this
-
emanden liked this
-
andrewgreene liked this
-
mwunsch liked this
-
ksheurs liked this
-
bloodyrikki liked this
-
aamaliaa liked this
-
ben liked this
-
jstn liked this
-
david liked this
-
swindsor said:
Because u no ruby.
ruby-doc.org/core-1….
-
neuski liked this
-
bebopspider reblogged this from jacob and added:
useless boolean is useless
-
tooepic liked this
-
spencerfry liked this
-
nonowarn liked this
-
gooftr00p liked this
-
antigirl liked this
-
tjisdope liked this
-
adobelightroompresets liked this
-
zoya liked this
- Show more notes