Linked by John Collins on Wed 21st Apr 2004 06:42 UTC
General Development The purpose of this article is to give a novice programmer the basic idea of what OOP is, as implemented using PHP. Readers should have a basic knowledge of programming ie what variables are, variable types, basic methods of writing comments, and how to enter code into a text editor.
Permalink for comment
To read all comments associated with this story, please click here.
Re: what about
by rycamor on Wed 21st Apr 2004 16:48 UTC

Bah... whether a language is strongly typed or interpreted has nothing to do with whether it is OO. That is like complaining that Perl isn't compiled, so it is not procedural like C. In fact, there is no clear formal set of rules as to what exactly defines an OO language. This even goes down to such things as prototypes vs. classes, function nesting, etc...

Of course, no one in his/her right mind would argue that PHP4 is a very complete OO language, but PHP5 actually offer almost all of the things you refer to, including the ability to restrict automatic type conversion. (http://zend.com/php5/articles/engine2-php5-changes.php)

What you are really talking about is not OO, but general language design goals. PHP is designed as a scripting language. Scripting languages in general are weakly typed, and allow for such interesting things as dynamic evaluation, etc... In fact, there are some very logical arguments FOR weak typing in scripting languages, as argued by the creator of TCL. PHP is not meant to be the language for serious "business objects" (Personally, I'll keep my business logic in the database, for the most part, but PHP can easily interact with many "heavier" systems where an enterprise might keep its core business logic)

PHP doesn't "teach" you to combine logic and presentation. It leaves the choice up to you. With PHP, I haven't munged business and presentation together in years.

Sorry for the rant, but I'm tired of hearing all the same tired old arguments.