View Single Post
Old 11-27-2012, 12:53 AM   PM User | #10
Thyrosis
New Coder

 
Join Date: Nov 2012
Posts: 72
Thanks: 4
Thanked 11 Times in 11 Posts
Thyrosis is on a distinguished road
I think PHP OO is the easiest way of setting up a larger project. If you're only using some PHP in a website, it's quicker to do it procedural style.

That being said, on a larger project OO is definitely worth the extra time-investment at the start, as it makes handling objects (whether it being a blog-post, shopping cart or whatever) so much easier once defined as an object. It also makes code more readable IMHO. I've just rewritten a procedural style function call in a page to an object, which changed my pages code from
PHP Code:
function($a$list$with$thirteen$POST$variables$all$related$to$a$blogpost); 
to
PHP Code:
$item->load_details($POST);
$item->function(); 
I rarely use procedural style any more when OO gives me a clearer view on the matter. It's still a programmers choice though and I suppose you should go with what you're comfortable with.
Thyrosis is offline   Reply With Quote