[thelist] how object oriented is php4

Andrew Embler (ML) lists at electricstate.com
Wed Mar 26 23:13:54 CST 2003

on 3/26/03 7:31 PM, Prachi Soni at prachi_soni at yahoo.com wrote:

> Hi,
> I was wondering how object-oriented is php4? What characteristics makes it
> object oriented and what all stops it?.It would be great if I get few thoughts
> on it.
> Soni

Well let's see...I really enjoy working with PHP, so it surprises me that
I'm going to open this discussion with some mildly disparaging remarks, but
one part of PHP that frustrates me (in comparison to true object-oriented
languages like Java) is its lack of typing. For example, I can't, in a
class, declare several separate functions which take discreet types.

function thisFunction(int iVar) {
    # Here we do some integer related functions

function thisFunction(string sVar) {
    # Here we do some string-related stuff

This is the sort of thing that doesn't really seem terribly important until
you'd like to use it. PHP's general ease-of-use and accommodating nature is
great - when you're first learning it - but it becomes slightly limiting as
you become more experienced.


More information about the thelist mailing list