Web is for video playback, reading news and blogs, Business app?, desktop, using web services.
2001 called, it wants its antiquated attitude back. The web evolves: deal with it. You bitching about what the web is now isn't going to make us all suddenly go back to "video playback, reading news and blogs".
- Arrays and hashes are the same data structure, for no readily apparent reason. Also, the simplest way of using that data structure is "array(a,b,c,...)", not "[a,b,c,
So? Does this gripe have any practical implications? Or is it just a whine for a whine's sake? Also, as of PHP 5.4 (which has been March 2012 BTW), you CAN use the [a,b,c] syntax to create arrays.
- All variables start with $, in imitation of Perl, but don't use the @ or % prefixes the way Perl does, instead just pretending everything's a scalar even though it's not.
Again - so what? You presumably learned how PHP variables work, so you're doing OK. Don't worry about Perl when you're using PHP.
- For a long time, OOP was an afterthought.
But it's not an afterthought now. Or are you still using PHP 4?
- Unlike other scripting languages like Python, Ruby, and Perl, PHP can't figure out which files to include for you when you reference something outside of the current file. Instead, it offers a global facility called an "autoloader" that allows you to write your own code to tell it how to find it, which completely breaks when multiple libraries have competing autoloaders trying to pick up two different classes with the same name.
Again, don't worry about other languages. You're using PHP. And, more importantly, why are you using libraries with their own autoloaders?
- Library functions display no consistency whatsoever. Some are camelCase, some are under_scored. Some search functions put the needle before the haystack, some the other way around.
I agree that this is annoying. But is it a show-stopper?
- Some operators are funky: Values can be equal without being the same thing, for example.
Once again: so what? It's not random behavior. Learn how this stuff works and then move on with your life.
- A significant number of errors, instead of generating exceptions that can be caught and handled, generate fatal errors, which crash your application no matter what. By comparison, Perl, Python, Ruby, and Java allow you to handle almost any error.
What do you mean by "handle"? If you mean catch and log, then PHP allows you to catch all errors, including fatal ones (see register_shutdown_function for example). If you mean "recover from", I would suggest that attempting to "recover" from a fatal error is a very bad idea. A fatal error means that something is seriously wrong with your application - the "recovery" should be fixing it, not pushing it under the rug.
Your points just touch on the same old, tired "but it's not like $randomLanguageName and therefore it's bad!" If you constantly compare PHP - or any language - to other languages than I'm afraid you'll have a long road to hoe. If PHP is your chosen tool - as it is for me - learn it inside and out and stop comparing it to other languages.
Nothing motivates you better to go back to the grind of corporate work than 7 years of shitty diapers. I love my kids, but 7 years of diapers was enough. Much happier with a regular paycheck and a nanny.
Maybe your problem was leaving your kids in diapers until they were 7?
To stay youthful, stay useful.