PHP: The Good Parts and over one million other books are available for Amazon Kindle. Learn more

Vous voulez voir cette page en français ? Cliquez ici.

Sign in to turn on 1-Click ordering.
More Buying Choices
Have one to sell? Sell yours here
Start reading PHP: The Good Parts on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

PHP: The Good Parts [Paperback]

Peter MacIntyre
2.5 out of 5 stars  See all reviews (2 customer reviews)
List Price: CDN$ 35.50
Price: CDN$ 19.75 & FREE Shipping on orders over CDN$ 25. Details
You Save: CDN$ 15.75 (44%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Usually ships within 2 to 4 weeks.
Ships from and sold by Gift-wrap available.


Amazon Price New from Used from
Kindle Edition CDN $14.67  
Paperback CDN $19.75  
Save Up to 90% on Textbooks
Hit the books in's Textbook Store and save up to 90% on used textbooks and 35% on new textbooks. Learn more.
Join Amazon Student in Canada

Book Description

April 30 2010 0596804377 978-0596804374 1

Get past all the hype about PHP and dig into the real power of this language. This book explores the most useful features of PHP and how they can speed up the web development process, and explains why the most commonly used PHP elements are often misused or misapplied. You'll learn which parts add strength to object-oriented programming, and how to use certain features to integrate your application with databases.

Written by a longtime member of the PHP community, PHP: The Good Parts is ideal for new PHP programmers, as well as web developers switching from other languages.

  • Become familiar with PHP's basic syntax, variables, and datatypes
  • Learn how to integrate the language with web pages
  • Understand how to use strings, arrays, and PHP's built-in functions
  • Discover the advantages of using PHP as an object-oriented language
  • Explore how PHP interacts with databases, such as SQLite and MySQL
  • Learn input- and output-handling best practices to prevent security breaches

Special Offers and Product Promotions

  • Join Amazon Student in Canada

Customers Who Bought This Item Also Bought

Product Details

Product Description

Book Description

Delivering the Best of PHP

About the Author

Peter MacIntyre lives and works in Charlottetown, Prince Edward Island, Canada. He has over 20 years of experience in the information technology industry, primarily in the area of software development.

Peter's technical skill set includes several client/server tools and relational database systems such as PHP, PowerBuilder, Visual Basic, Active Server Pages, and CA-Visual Objects.

Peter is certified by ZEND Corporation on PHP 4.x and has contributed writing material for Using Visual Objects (Que Corp.), Using PowerBuilder 5 (Que Corp.), ASP.NET Bible (Wiley Pub.), and Web Warrior Survey on Web Development Languages (Course Technology). Most recently he has co-authored the Zend Studio for Eclipse Developer's Guide - Addison-Wesley.

Peter is a former contributing editor and author to the on-line and in-print magazine called php|architect ( He has also spoken several times at North American and International computer conferences including CA-World in New Orleans, USA; CA-TechniCon in Cologne, Germany; and CA-Expo in Melbourne, Australia.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Customer Reviews

5 star
3 star
2 star
2.5 out of 5 stars
2.5 out of 5 stars
Most helpful customer reviews
4.0 out of 5 stars Bon livre de PHP Nov. 2 2011
By Yuward
Format:Paperback|Verified Purchase
Très bon livre qui est autant pour les connaisseurs que les débutants, comme la plupart des livres de programmation de O'Reilly The Good Parts.
Was this review helpful to you?
1.0 out of 5 stars There are more good parts than this May 24 2010
I was expecting a book that highlighted the features of PHP much in the same way Douglas Crockford's "Javascript: The Good Parts". Instead it was a book who's contents could've been found in 30 seconds of searching on Google. Extremely disappointed, nothing really highlighting the strengths of PHP.
Was this review helpful to you?
Most Helpful Customer Reviews on (beta) 2.4 out of 5 stars  11 reviews
46 of 47 people found the following review helpful
1.0 out of 5 stars Knowing the Good Parts requires understanding the bad Sept. 6 2010
By Stephen McMahon - Published on
O'Reilly's "The Good Parts" series began with Crockford's outstanding "JavaScript: The Good Parts," which established a very high standard for a book claiming to detail the good parts of a technology. In "The Good Parts," Crockford detailed a great many things that were fundamentally wrong in the definition and practice of JavaScript and how it was possible to carefully use a well-chosen subset of the language, "the good parts" to achieve more professional results.

If there's any modern programming language that's more synonymous with bad architecture and poor real-world practices than JavaScript, it's PHP. The top tier of PHP programmers acknowledge this and work in environments that rigorously enforce coding standards meant to protect them from the bad parts of PHP.

I turned to "PHP: The Good Parts" with the hopes that it might detail these kinds of standards and practices. Instead, I found a through-the-looking-glass view into a cheerleader world where PHP is "nothing but good" and the author is at a loss to think of anything wrong with the language.

One could blame this on the author, but I'm inclined to blame it on the publisher. O'Reilly, did you really not know that you had something special going with "the good parts" and that the title promised a book by a master showing the benefit of a lot of experience? Or, did you cynically think that the general level of PHP programming expertise is so low that nobody would notice the difference?
33 of 33 people found the following review helpful
1.0 out of 5 stars Author missed the point Oct. 5 2010
By Gregory Fodor - Published on
The author clearly never read Crockford's Javascript: The Good Parts, or at least if he did he missed the point entirely. Crockford's book served as a map to guide you through the best ways to use Javascript without falling into pitfalls. Javascript, a language programmers have been raised to detest due to shoddy examples abusing the worst parts of the language, started to see its reputation turn around when Crockford's book hit the shelves. Crockford made a strong case that underneath it's Bad Parts lie a beautiful language that programmers can find joy in.

No such case is made in this book. In fact, a good chunk of this book is dedicated to building some project involving an SMS gateway instead of talking about the language semantics that make PHP what it is. The author's claim that he doesn't think there are any Bad Parts to PHP (in the "Bad Parts" appendix) shows he has not worked with many other programming langauges, if any, than PHP. I have a hard time believing the choice for the title of this book was meant for any reason other than to sucker people in (like myself) who loved Crockford's book and expected a similar "clean slating" for the other much loathed language of the web, PHP.

I was hoping for an in-depth discussion of the details of the language, the design choices its author made, and how to avoid common traps when writing PHP code. I wanted to see what functions and constructs to avoid, and what patterns were common enough to use idiomatically. Instead what I got was a basic introduction to the simplest concepts in the language ("Objects" being the epic crescendo of this grand tour) and many pages of rambling on about some SMS project. I would have read through it in more detail if it weren't for the author's ridiculously bad security through obscurity advice peppered throughout, which I'll spare him the pain of seeing reprinted here.

If you want to learn PHP, pick up another book. If you want someone to dissect the language for you and tell you how to write Good PHP instead of Bad, well, I guess we'll just have to wait for that book to be written. It's a shame someone has already taken the title it'll need.
32 of 32 people found the following review helpful
1.0 out of 5 stars Misses every possible audience Oct. 27 2010
By Scott Shattuck - Published on
"The Good Parts" series, as established by Douglas Crockford, set a high standard that helped any JavaScript developer move up one or more levels in their craft by gaining a clear understanding of what was good _and bad_ about JavaScript. As an experienced JS developer with over a decade of pure JavaScript experience I found almost nothing to criticize about that book and was reminded of a few subtleties I'd forgotten over the years. It was a perfect refresher for me and a great introduction for anyone less experienced in what to avoid.

This book does nothing of the sort.

Unlike JavaScript, I'm completely new to PHP. I've never written a single line of the stuff. Going on the basis of my experience with Crock's book I had hoped to get a useful introduction to PHP and a clear view of the minefield that experienced programmers realize exists in every language. This book blew smoke in every direction; the author even wasted my time by claiming he couldn't really think of any bad parts. I wish I'd seen that comment when scanning the book in the bookstore, I could have saved myself a lot of time and $.

From a pure beginner perspective simple things like the '.' operator for string concatenation are never explained, they just start appearing in code samples. In terms of language introduction there's fragmented coverage of the core language constructs, scattered coverage of basic string and array functions with no summaries or API/signature examples, and no coverage of generally accepted PHP coding standards (the samples in the book don't use "fully bracketed ifs" for example). I don't feel like reading this book allows me to do anything other than go in search of another introductory book on PHP armed with some idea of what _not_ to buy.

If I were an experienced PHP programmer I can't imagine I would have found anything of value in this book. The language coverage is so basic I presume it's common knowledge to anyone who's used PHP for any period of time. At the same time there are no minefield topics worth discussing with the possible exception of the discussion around the admittedly questionable decision to add 'goto' to PHP 5.3.

As someone who's done OO development in a half-dozen other languages I'd have to say Chapter 6, on OO in PHP, should be torn out and run through a shredder. It's the worst coverage of OO I think I've ever seen in print. Unfortunately, subsequent chapters refer to Chapter 6 as if it taught you something that you'd need to know.

All in all this book has to be one of the worst O'Reilly titles I've ever read...and I've read over 100 over the years. Admittedly ORA has been disappointing me more and more often in recent years, but not all of what's wrong with this book can be laid at the publisher's feet.

Perhaps this is all just a reaction to expectations set by the title which were completely unmet. Consider yourself warned however. If you think this book is going to give you the same meaty-yet-concise treatment of PHP that Crock did for JS you're going to be very disappointed.
5 of 5 people found the following review helpful
1.0 out of 5 stars PHP Parts June 20 2012
By Ben - Published on
Format:Paperback|Verified Purchase
My sole experience with The Good Parts series has been with JavaScript The Good Parts, written by Douglas Crockford, which is an excellent book. It goes into deep detail of the JavaScript language, discussing it's type system, functions, closures, object model, and object functional reference. It explains the best practices of a JavaScript programmer and what bad practices to avoid. It is an excellent reference for both the novice JavaScript programmer and the seasoned. It cleared the name of somewhat misunderstood and misused language and saved the world from slews more of misguided code.

That is standard I expect when I see the "The Good Parts" label on a book published by O'Reilly. Much to my disappointment, I did not experience anything approaching that same level of quality or discussion in PHP The Good Parts. This book is written only for a novice programmer, and I might even argue an individual who has never written code. It does not promote the best practices of our industry, nor discourage the bad. For example, the use "define" is encouraged within the first few chapters. Although, listed as the first item of the bad parts, "goto" is listed among the good parts! How can "goto" ever be considered a good part of a modern language that offers classes and other complex flow structures???

PHP has been plagued by a legacy of global functions, procedural behavior, and the "dot" concatenation operator for a long time and with PHP 5.3+ is finally clearing its name. What better time to publish a PHP The Good Parts manual resembling the JavaScript counterpart? Instead, we are given this book, which focuses on the same old properties of PHP. An author should be honest and I feel that Peter MacIntyre was too fair to PHP's bad parts.

I would not recommend this book to any developer I want working on my team. I would not recommend this book to someone looking to learn how to program.

I propose the book either be taken off the market or renamed to "PHP, Parts."
4 of 5 people found the following review helpful
2.0 out of 5 stars hasty cash-in with misleading title Feb. 17 2011
By _eam 0 n_ - Published on
Maybe it is because I have a lot of programming experience that I find this book poor and it may well cover things that the novice won't find in the weightier tomes but I felt a bit a bit let down by this book. I was hoping I would learn some neat PHP tricks and producitivy hacks or some best practices in how to organise code and build applications. Instead you get some very short examples of core functions and how to use them. $_GET and $_POST are not "the good parts" of PHP. They are the fundamentals. This book would be useful for a complete newcomer to the language who already has experience of another non-similar language or an intermediate PHP user perhaps migrating from an older version of the language.

Pluses of this book:
+ Well written accessible
+ Gives examples of some Basic and Basic-to-Intermediate features of PHP

- Not enough detail for complete novices
- Not anything more than in the PHP online manual
- Not much useful for intermediate PHP users
- Use of MD5
- Very short
Search Customer Reviews
Only search this product's reviews

Look for similar items by category