Jump to ratings and reviews
Rate this book

Object-Oriented Programming with PHP5

Rate this book
Object-Oriented Programming with PHP5

272 pages, Paperback

First published January 1, 2007

10 people are currently reading
41 people want to read

About the author

Hasin Hayder

8 books7 followers
Hasin Hayder is a Bangladeshi programmer and technology writer.

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
6 (23%)
4 stars
7 (26%)
3 stars
8 (30%)
2 stars
2 (7%)
1 star
3 (11%)
Displaying 1 - 6 of 6 reviews
Profile Image for Abdulrahman Asaad.
14 reviews1 follower
February 18, 2018
I read this book on 2018 :D, but It still good book to read, there's a very useful chapters like 2,3,4 and 7, It's a fast introduction to php 5 and base to php 7.
Profile Image for James Stewart.
38 reviews6 followers
December 22, 2007
With PHP 5.3 looking very close to release, bringing with it significant changes such as namespaces, this is an awkward time to release a PHP book of any generality. Within a few months it will be clearer how well the new features are taking hold and there is almost certainly going to be a clamour for books that show how new features affect development practices and how to make use of them. Even without that, it is hard to recommend this book as it fails to live up to its promise and provides a poor introduction to Object-Oriented programming.

The book's first problem is the poor quality of the English contained. The author does not appear to be a native English speaker and the publisher has apparently done little to clean up the language. For the most part that simply makes for some curious rhythm and phrasing but there are a number of places where it contributes to inaccuracies, such as constant confusion between objects and classes. Finding such inaccuracies alongside mistakes such as confusing polymorphism and inheritance I'm left wondering how well the authors really know their subject. Packt would do well to employ another reviewer to clean up the syntax and definitions before any reprints.

The structure of the book is curious. Rather than approaching topics through the use of an example project or projects, the author gives disconnected samples, often offering little beyond that which can be found in the online PHP documentation and generally failing to explain how techniques would be useful. While he insists that PHP5's Reflection API is an important tool, there is little to back up that assertion. There's a large code sample and a list of the methods and attributes of a reflection object, but no real substance. The database section covers some key examples, such as PDO, ADODB and MDB2, and touches on the ActiveRecord pattern, but uses four pages to list the RDBMSs that ADODB supports and then only spends a page and a half on ActiveRecord, failing to explain either its concepts or advantages in any detail.

The high point of the book is the half chapter on unit testing. A few well chosen examples provide a demonstration of how code can be tested and how that allows for refactoring without fear of regressions. The reasons for unit testing are clear as is basic usage of PHPUnit. I'd have liked to see further examples rather than several pages listing all the default assertions PHPUnit provides, and I disagree with the claim that there should never be more than one assertion per test (individual tests should focus on a single concern, but can use multiple assertions to do so) but by that point in the book it was good just to see a section that made its point clearly.

Fundamentally, I came away from this book feeling it had failed to communicate clearly the core principles or reasons for object oriented programming. By trying to cram in too much reference material, not offering clear contexts for each technique, and not lingering on ideas like encapsulation the book fails to instill OO techniques.

Disclaimer: I was sent a free copy of this book to review
Profile Image for Mumin.
39 reviews6 followers
January 30, 2017
The book explains about design patterns including OOP. But the explanation of the book is a little bit difficult for beginners.
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.