Jump to ratings and reviews
Rate this book

PHP Objects, Patterns, and Practice

Rate this book
Backed by a tireless development community, PHP has been a model of language evolution over its 10+ year history. Borne from a contract developer's pet project, these days you'll find PHP powering many of the world's largest web sites, including Yahoo!, Digg, EA Games, and Lycos.

PHP Objects, Patterns, and Practice, Second Edition shows you how to meld the power of PHP with the sound enterprise development techniques embraced by professional programmers. Going well beyond the basics of object-oriented development, you'll learn about advanced topics such as working with static methods and properties, abstract classes, interfaces, design patterns, exception handling, and more. You'll also be exposed to key tools such as PEAR, CVS, Phing, and phpDocumentor.

What you'll learn Write solid, maintainable code by embracing object-oriented techniques and design patterns Create detailed, versatile documentation using the powerful phpDocumentor automated documentation system Gain new flexibility during the development process by managing your code within a CVS repository and using the Phing build system Capitalize upon the quality code of others by using the PEAR package management solution Who this book is for PHP developers seeking to embrace sound development techniques such as object-orientation, design patterns, testing, and documentation.

487 pages, Paperback

First published December 1, 2007

88 people are currently reading
466 people want to read

About the author

Matt Zandstra

28 books13 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
188 (40%)
4 stars
176 (38%)
3 stars
80 (17%)
2 stars
12 (2%)
1 star
3 (<1%)
Displaying 1 - 24 of 24 reviews
Profile Image for Bonix.
29 reviews2 followers
October 7, 2011
I've tried to read this book just when I started with backend programming, it was a very accessible read, although everything was so new to me that I could not assimilate half of it's content. I dropped this book because I felt too overwhelmed with information, but it was a good basis. Every so often this book and its examples came to my mind while working with different php frameworks, so I decided to give it another shot a few years later. I was surprised how easy all the content came to me, it was a pleasant reading and a lot of concepts came every easily.

II would recommend this book for everyone, from novices to experienced programmers. For novices I would recommend the first part, that gives a very good introduction to object oriented programming. Experienced programmers will find more useful the second and third part, where it gives you a good introduction to UML and PEAR, also a good overview on patters and good coding practices.
Profile Image for Brandon.
26 reviews1 follower
Read
October 6, 2012
great read for anyone who uses php on a regular basis and wants to build better objected orientated applications.
Profile Image for Rafael J. Mateo C..
7 reviews2 followers
July 18, 2018
Overall, this is a very good book. It covers lots of design pattern and the chapter about OOP is excellent.

The only problem I found is that some code examples are hard to follow, specially those in chapter 12 and 13. For that reason, this book should be read by experienced php programmers.
Profile Image for Ihor.
1 review
January 16, 2020
In this book reviewed less than half of common patterns and, in my opinion, sometimes author selected not the best examples. In addition, some of the described tools/libraries are really outdated and can not be recommended for usage, for example, Phing.
Profile Image for Scott Keck-Warren.
14 reviews
July 26, 2017
The center section of the book was very dry but it was a good overview of a lot of different topics.
2 reviews
March 11, 2018
This is a great book to learn from. I'm on page 102, and I had to leave a 5 star review because this book is a must have for every php dev.
19 reviews
September 30, 2019
Хороший набор методов и техник работы. Местами есть излишняя детализация.
Profile Image for Hennadiy.
85 reviews1 follower
July 1, 2021
Одна из самых полезных книг по PHP, в которой четко написано, что такое class, abstrack class, trait, interfaice
Profile Image for mobydickens.
458 reviews14 followers
May 18, 2023
Ugh... There is nothing worse than reading about code.

It has a lot of good info though; I skipped portions that seemed outdated or not really applicable to me.
Profile Image for Gerd.
19 reviews
February 1, 2016
This book, being first released in 2007, is a timeless piece and valuable for different reasons. It is the ultimate representative for PHP in the Patterns series for programming languages. Giving a strong introduction to object-oriented programming and then bridging over to the Patterns. Technically difficult parts are the Enterprise and Database architecture chapters in the middle part. These are really advanced and I can't say that I took something away from it. There, starting from the WOO example: a program to organized Venues, Spaces, Events the author builds a Framework, introducing components as Registry, Mappers, etc you would also find in modern PHP frameworks like Symfony or Doctrine. So it would be best to re-read this part if one is experienced with a framework. I enjoyed the last part where he introduces the ecosystem: PHPUnit, PEAR, Git, Phing, Jenkins with a simple sample application at hand which was fun to follow.I recommend to read this book after maybe one year of programming excercise in PHP and after having a detailed glimpse at the architecture of frameworks or CMS solutions based on PHP (and perhaps MySQL).
379 reviews10 followers
June 13, 2011
Il miglior libro che abbia letto finora sulla programmazione a oggetti in PHP. Spiega molto bene i motivi per cui si usa la OOP, affronta bene i pattern e porta molti esempi pratici, adattando i pattern classici, molti dei quali pensati per linguaggi statici, alle caratteristiche di un linguaggio dinamico come PHP. Tratta anche delle nuove caratteristiche introdotte in PHP 5.3 (namespace e anonymouse functions principalmente) e ne mostra gli utilizzi pratici. Tra i possibili difetti: - ho trovato un po' fumoso il capitolo sugli Enterprise Patterns, forse perché per molti di loro non ho mai visto una necessità reale nei progetti che ho gestito. - tratta abbastanza bene lo unit testing, ma è carente per quanto riguarda integration testing, ed è un po' stringato riguardo la Continuous Integration. Dà comunque delle buone basi su cui approfondire gli argomenti.
Profile Image for Alexander Morozov.
34 reviews1 follower
January 26, 2016
Прочитал 3 и 4 издание этой книги.
Замечательная книга, но начинать с неё знакомство с PHP не рекомендую. В книге подробно не разжёвываются значения встроенных функций и некоторые конструкции языка. для начала лучше изучить PHP 5.
Сам начинал углублённое знакомство с PHP с неё, после ~70 страницы стал недопонимать некоторые выражения. Вернулся к книге PHP 5 и после снова к этой. Уже всё стало понятно. После прочтения, сразу вышло 4е издание. Постепенно прочитал его, уже понял значительно больше, и думаю ещё не раз к ней вернусь для справки.
Между 3 и 4м издание больших отличий не заметил, не критично.
Profile Image for Human Being.
8 reviews
October 29, 2016
One of the best books you can read to improve your knowledge about PHP OOP and Design Patterns especially MVC design pattern, it helps you understand how popular php frameworks work and with some additional effort, you can start developing your own framework, it's really a brilliant book and shift my knowledge to great extent.

I'm waiting for the fifth edition to know how the author extend the code to include the new features PHP offered since the book have been published.

if you have a basic knowledge about OOP and can't develop using it/can't choose your classes/ can't understand what is OOP all about and how it differs from procedural programming and the usefulness it provides to programming world, this book will help you get the real purpose of OOP.

I'm really grateful for the author.
Profile Image for Bill.
1 review7 followers
August 27, 2013
Excellent book for those coming from traditional object oriented languages like C++ or Java. It shows that PHP, though coming from a procedural legacy, now has significant and serious object oriented capabilities and so can be used in a disciplined and productive manner if one chooses to do so. The book provides many of the perspectives and instruction to make this transition to object oriented PHP easier and more enjoyable. This is easily my favorite book for thinking about PHP in an object oriented manner.
3 reviews
March 6, 2016
It was a good start for me - before this book I was writing procedural code and was even afraid to create "too much objects". This book's set me free from this fear and I started experimenting, and I feel grateful because of this.
I would not recommend it to anyone who's at the very beginning in programming or who doesn't know PHP, but it's definitely a way to go into object-oriented programming in PHP after one is comfortable with the language itself.
4 reviews
July 26, 2012
Very clear book on the object-oriented aspects of PHP. This book changed my perception of PHP from that of a web scripting language to that of a genuine programming language. I would highly recommend it to the intermediate PHP programmer.
Profile Image for Marco Emmanuel Patiño Acosta.
11 reviews1 follower
February 15, 2013
It's an excellent resource for someone who's starting to program in php or want to improve their programming skills, however many implementation of design patterns can be confusing. The unit testing chapter is excellent and in overall the book will guide you through common practices and tools.
34 reviews2 followers
June 28, 2011
The examples are a little hard to follow and I think the book could benefit from an extended case study or two. Overall though, good intro to PHP OOP with design patterns.
Profile Image for Nick.
18 reviews2 followers
July 21, 2013
Explains everything very clearly, but gets hard to remember some of the patterns after reading so many pages.
Profile Image for Yitzchak.
18 reviews4 followers
April 28, 2011
Reading this book was the first time I ever got OOP. Very accessible. Thanks Matt!
Displaying 1 - 24 of 24 reviews

Can't find what you're looking for?

Get help and learn more about the design.