tags:

views:

1522

answers:

2

Hi, I've been coding PHP on and off for a few years, mostly some basic apps and sites. Not very much OOP at all. I've done some basic OOP but I don't really know if I'm doing it correctly or if I'm following best practices etc.

I know PHP pretty well but up until now my code has mostly been functional with some minor OOP.

Now I want to take the next step and learn proper OOP and PHP OOP. I know what an object is supposed to be and all that but I can't really wrap my head around how to use it, and how to do it well, when it comes to real code and real sites, that's why I'm looking for book recommendations.

I'm looking for a good book that will explain the basics of OOP and explain how to use them in PHP in real life stuff so that I can take the next step in my PHP coding.

I'm not really looking for any beginners book since I know PHP already.

A big plus would be if it also contained information about more advanced PHP stuff like PHP unittests etc.

Any recommendations?

+7  A: 

I recommend PHP Objects, Patterns, and Practice by Matt Zandstra and Object-Oriented PHP: Concepts, Techniques, and Code by Peter Lavin

Galwegian
Seconded! Very straightforward and useful.
philistyne
A: 

You'll definitely benefit from OO in PHP. However, as far as PHP is not the best object-oriented language out there, for "purity of thought", I'd suggest to get to know OOP without PHP specifics first. And then, the ultimate one is the Grady Booch's book "Object-Oriented Analysis and Design with Applications". Absolutely the best one out there for beginners.

Ivan Krechetov