3. Before the designers grafted in objects, PHP was definitively not Java. It had one data structure, the array(). (I won't go so far as to call it a simple data structure, because its semantics are kind of nutty, but it's a lot simpler than the Java class system.) You can go very far in PHP without having to know what a class is.
Now that every schooled developer has been exposed to Java ad nauseum we're all blind to the fact that OO is not at all intuitive. You've got to keep a bunch of abstract hierarchies in your head simultaneously. (Classes can inherit from other classes; objects are instances of classes; objects can contain other objects.) You've got to learn a bunch of odd semantics. (Constructors look like functions but are called by the new operator. Destructors never get explicitly called at all. There's static members and public members and private members.) Then you've got to know how to use objects properly or you'll just make a mess; that involves learning a moderate amount of OO theory or reading one of those doorstopper-sized patterns books. As every DailyWTF reader knows, even a lot of ostensibly-trained professional developers do not actually understand this. It's a lot to ask of a person who just wants to learn how to rearrange the widgets on their Wordpress blog.
There are, of course, a few other languages that don't impose OO on people at time zero, so this is hardly a unique feature of PHP. But it is a feature. Or it was, anyway... PHP now has a tacked-on object system that is vaguely reminiscent of Java.
I agree, coding in PHP is far less enjoyable now that the language is, in my opinion, polluted with Java-esque object orientation. Most new code that I come across nowadays feels horribly overengineered. Objects are a good thing when used sparingly, but PHP never needed design patterns to be viable. Drupal is a perfect example of robust, modular software that doesn't need verbose object syntax.
Now that every schooled developer has been exposed to Java ad nauseum we're all blind to the fact that OO is not at all intuitive. You've got to keep a bunch of abstract hierarchies in your head simultaneously. (Classes can inherit from other classes; objects are instances of classes; objects can contain other objects.) You've got to learn a bunch of odd semantics. (Constructors look like functions but are called by the new operator. Destructors never get explicitly called at all. There's static members and public members and private members.) Then you've got to know how to use objects properly or you'll just make a mess; that involves learning a moderate amount of OO theory or reading one of those doorstopper-sized patterns books. As every DailyWTF reader knows, even a lot of ostensibly-trained professional developers do not actually understand this. It's a lot to ask of a person who just wants to learn how to rearrange the widgets on their Wordpress blog.
There are, of course, a few other languages that don't impose OO on people at time zero, so this is hardly a unique feature of PHP. But it is a feature. Or it was, anyway... PHP now has a tacked-on object system that is vaguely reminiscent of Java.