PHP 5 is just as object-oriented as Python, Perl or Javascript. Sure, you can have global variables and functions that aren't tied to classes, but you can do that in the CLR too (you just can't write 'em in C#.)
PHP 5 is just as object-oriented as Python, Perl or Javascript. Sure, you can have global variables and functions that aren't tied to classes, but you can do that in the CLR too (you just can't write 'em in C#.)
Yes, it has the 'class' keyword, but [it seems] that was bolted on relatively late and wasn't the primary focus in PHP's design.
See the linked article: http://michaelkimsal.com/blog/php-is-not-object-oriented/
I worked with numbers of people who all fawned over PHP5, some going so far as to (ignorantly) say "PHP4 didn't support classes". Of course it did - the class keyword was there, and I'd done a lot of OO work in PHP4 for many years.
Yes, there's more class functionality in PHP5, but it's not on parity with some other languages. AND THAT'S OK.
My beef was/is mostly with the term "object oriented". PHP as a language is not oriented about objects. Your apps can be, to a large extent, but the language is not oriented about objects the same way that Groovy or Ruby or Python is. And it shows.
So.. embrace the function-based nature of PHP's core which allows you to build OO or procedural based on your needs. Just quit saying "PHP is Object Oriented" just because it's "Object Capable".
It was really just a semantic beef I had some time ago, and really would prefer people embrace the things about PHP which make it useful, rather than trying to sell it as something where it comes up short.