The Practicality of OO PHP
Subject:   PHP OO drawbacks
Date:   2005-07-28 23:30:16
From:   jacekp
The so called 'longer development time' is not really a drawback at all. Once you get comfortable with OO (designing classes) it doesn't take much more time. However PHP OO, especially with version 4.x has a lot 'languae-level' drawbacks, that require you to maintain strict discipline and use various tricks. Personally I found that annoying enough to drop PHP for few applications. If you want to stick with PHP, then you might want to take look at You can find there a lot of tips for clean PHP OO programming.
Full Threads Newest First

Showing messages 1 through 1 of 1.

  • PHP OO drawbacks
    2005-07-29 07:32:49  mr_peanut [View]

    Thanks for your comment! I agree with you that once you get comfortable with OOP that it definitely doesn't take as long; however, personally, I feel there is usually a longer initial programming time. Maybe because I try to organize my class files too much and add a substantial amount of comments :-) But, like the article says, as soon as you use the class a second time your productivity has increased substantially--so whether or not it initially takes you longer, you're still saving time.

    PHP 4.x does have some object drawbacks, but with the new PHP 5 object model, I think programmers migrating from other programming languages may feel a little more at home.

    I'll definitely check out