2 ms·
The web stack at Last.fm is PHP, for better or worse. It's certainly not a pretty language. Or consistent. Or advanced. I've got a theory on why so many lar
by dunk010 16y ago
The web stack at Last.fm is PHP, for better or worse. It's certainly not a pretty language. Or consistent. Or advanced. I've got a theory on why so many large websites use PHP though - from Facebook, through Flickr, Yahoo and Last.fm. I think it's a combination of PHP being the best option available at the time many of these large websites were set up, and it being a very simple language. Yes, I actually think that can be an advantage. In PHP you don't spend any time beautifying things. You don't bother writing "clever" code because you can't, really. Writing in PHP pushes you towards making "the simplest thing that could possibly work" - which is so in sync with the most fruitful startup mentality.
It doesn't mean I like it though. It's still as ugly as sin. After all these years programming it I still get thrown by ($needle, $haystack) ($haystack, $needle) and have to look up which variant this particular function uses. I'd much rather be doing it all in Ruby. Or Lisp.
- Joeri 16y agoThe string functions are (haystack, needle), the array functions are (needle, haystack). And, no, knowing that doesn't actually help me because I always seem to mix them up anyway during coding.