News for hackers. Stuff that matters.
Re:Notes from porting C# code to PHP by moserware on Tuesday October 26, 2010 @11:02AM (#1834458)
(From the alt text on the hyperlink where I said that):

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/

Re:Notes from porting C# code to PHP by mgkimsal on Tuesday October 26, 2010 @11:20AM (#1834537)
That's my post, and I'll clarify a bit.

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".

Re:Notes from porting C# code to PHP by Jach on Tuesday October 26, 2010 @11:31AM (#1834586)
Perhaps we should start applying "Object Capable" to other languages like C and C++ and the Lisp family then? I like your distinction (and your article) so you get an upvote but I don't really find it that useful other than for anti-marketing.
Re:Notes from porting C# code to PHP by mgkimsal on Tuesday October 26, 2010 @01:47PM (#1835228)
Personally, I don't deal in those platforms, and I don't work with people trying to justify those other languages by claiming they're "object oriented".

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.