[UPHPU] Is OOP really bad in PHP?

Wade Preston Shearer lists at wadeshearer.com
Wed May 14 07:30:26 MDT 2008

On 13 May 2008, at 23:49, Nathan Lane wrote:

> I see your point. I think what I was getting at is that PHP is  
> becoming more
> OOP-based, so what's the harm in using objects (classes) for  
> everything? Is
> there something wrong with that, really? I think there is nothing  
> wrong with
> that, yet #26 states:
> "[Your a really lousy PHP programmer if you] misuse OOP /(I take  
> this as
> misuse OOP ==) everything you write , no matter how small is OOP.
> Am I incorrect in assuming such?  For example, would it be wrong to  
> wrap an
> HTML element into an object and use an xml writer to add elements to  
> it,
> then serialize it (or toString it) out to the browser at render time?

Well, for starters, this is just some blogger's opinion. Second, I  
think it entirely depends on what you are doing… perhaps it's true and  
perhaps it's not. Use the right too for the right project. As an  
example, I have a friend who is trying to "get into web development"  
and was asking me questions yesterday about how to set up a CMS and  
which one to go with. I found out the site he is going to build will  
be two pages. Using a CMS is a waste. I agree with the blogger, if  
literally _everything_ you write is wrapped in an object and you do it  
without considering if it is the correct approach to each situation,  
then yes, you're a lousy programmer. But that would apply to any  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2425 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20080514/d0bb26b2/smime.bin

More information about the UPHPU mailing list