Linked by Kroc Camen on Sat 20th Dec 2008 17:54 UTC
General Development IBM delves into what's new in PHP 5.3: Part-1 shows you the changes to the object-orientated capabilities, and Part-2 shows you the exciting new possibilities with real closures and lambda functions. ["Read more" for Kroc's personal commentary]
Permalink for comment 340911
To read all comments associated with this story, please click here.
PHP5 is object oriented
by g2devi on Sat 20th Dec 2008 23:24 UTC
Member since:

> PHP can claim to be "Object Orientated" until the cows come home,
> but the fact of the matter is PHP's native objects and commands
> are still painfully procedural

Sigh. I think you're confusing PHP4 with PHP5. PHP5 *is* objected oriented, just as C++ is.
PHP5's object model was based on Java's and contains more object reflection and method interception
features than either C++ or Java (though less than Python and Ruby). The fact that you can program
nonobjected oriented and nonprocedurally using functions that are common to C and Perl is a plus,
not a minus. It makes training and transitioning code away from these languages to PHP easier.

The key thing lacking in PHP5 is a good object oriented alternative to functionality that's currently
only available in functions. PEAR and the Zend Framework fill in the gaps substantially so that you can almost not have to call a single non-objected oriented function again. But neither
are "standard" in the sense that Python, Ruby, and Java have a standard library.

Reply Score: 2