Book Review: Wicked Cool PHP

By  on  

In the interest in full disclosure, I was sent this book by a fellow DZone Zone Leader in hopes that I would review it. I'm reviewing this book, however, in the interest of my audience.

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems

Written By
William Steinmetz with Brian Ward

Published By
No Starch Press

Publisher Summary:
PHP is an easy-to-use scripting language perfect for quickly creating the Web features you need. Once you know the basics of how the language works, wouldn't it be great to have a collection of useful scripts that solve those tricky problems and add interesting functionality to your site? We thought so, too.

Instead of starting at "Hello World," Wicked Cool PHP assumes that you're familiar with the language and jumps right into the good stuff. After you learn the FAQs of life-the most commonly wished for PHP scripts-you'll work your way through smart configuration options and the art of forms, all the way through to complex database-backed scripts.

Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text. The 76 easily implemented scripts will also teach you how to:

  • Send and receive email notifications
  • Track your visitors' behavior with cookies and sessions
  • Override PHP's default settings
  • Manipulate dates, images, and text on the fly
  • Harness SOAP and other web services
  • Create an online poll, ecard delivery system, and blog

But it's not all fun and games: Security is a big concern when programming any web application. So you'll learn how to encrypt your confidential data, safeguard your passwords, and prevent common cross-site-scripting attacks. And you'll learn how to customize all of the scripts to fit your own needs.

Dynamic Web content doesn't have to be difficult. Learn the secrets of the craft from two experienced PHP developers with Wicked Cool PHP.

The Review

One of the reasons that I prefer short tutorials and articles over programming books is that books generally give you five pages of theory and one page of actual code. Many times, they assume that the reader is a noob to the language (I understand that the publisher requires this and that it's not the author's fault). Not this book. Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems is a no-nonsense, "here's-the-code-here's-the-solution" type of book.

Wicked Cool PHP covers the basis of the most used facets of PHP: configuration, string manipulation, form validation, file handling, security, and more. Each code snippet is preceded by a short explanation as to the strategies used in the code. The code is presented very well and is easy to understand. Some code snippets are followed with candid explanations as to the disadvantages of using the given code.

Wicked Cool PHP also covers some little-discussed topics including cURL, PHP web services, and creating images with PHP. With web services becoming more and more popular every day (social networking and bookmarking APIs), the cURL and web services scripts in the book will be a great starting point for web service/XML noobs. Wicked Cool PHP wraps up with a few intermediate projects: creating a poll, e-greeting card, and basic blogging system.

Overall, Wicked Cool PHP is a solid, code-packed book for the rookie or intermediate-skilled PHP programmer that understands the basic principles of programming and security. The code provides real world problem/solution scenarios that every PHP programmer will need to know. The book also includes some less-known gems that will spark the inquisitiveness of the reader.

My only criticism of Wicked Cool PHP is that the "difficult problems" the book promises to solve aren't that difficult. The book covers strategies for keeping your web apps secure, using regular expressions, and session/cookie issues, but many other code snippets would be considered basic for any experienced PHP programmer. I would've liked to have seen topics like storing the session in a database, creating a basic MVC framework, and large form strategies.

Favorite Chapter

My favorite chapter of Wicked Cool PHP is chapter five: Working with Text and HTML. Regular expressions are extremely powerful and the amount of information you can acquire from simple page scraping and processing is amazing. Chapter five shows the user how to scrape a XHTML document for links, substring replacement, and converting plain text into XHTML markup.

The Verdict

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems is a wicked cool publication for rookie and novice PHP programmers. The collection of useful PHP scripts provided in Wicked Cool PHP can serve as a great library for a noob or a quick reference to fix the nagging issue plaguing a novice developer's web application. If you're looking for a book that's less theory and more straight-to-the-point code, Wicked Cool PHP belongs on your bookshelf.

Recent Features

  • By
    Create a CSS Flipping Animation

    CSS animations are a lot of fun; the beauty of them is that through many simple properties, you can create anything from an elegant fade in to a WTF-Pixar-would-be-proud effect. One CSS effect somewhere in between is the CSS flip effect, whereby there's...

  • By
    CSS 3D Folding Animation

    Google Plus provides loads of inspiration for front-end developers, especially when it comes to the CSS and JavaScript wonders they create. Last year I duplicated their incredible PhotoStack effect with both MooTools and pure CSS; this time I'm going to duplicate...

Incredible Demos

  • By
    CSS Tooltips

    We all know that you can make shapes with CSS and a single HTML element, as I've covered in my CSS Triangles and CSS Circles posts.  Triangles and circles are fairly simply though, so as CSS advances, we need to stretch the boundaries...

  • By
    Animated AJAX Record Deletion Using MooTools

    I'm a huge fan of WordPress' method of individual article deletion. You click the delete link, the menu item animates red, and the item disappears. Here's how to achieve that functionality with MooTools JavaScript. The PHP - Content & Header The following snippet goes at the...


  1. $20 on Amazon – not bad. I’ll note this for later when I’ll have some more free time.

  2. Demond

    PHP is so simple that you don’t really need to purchase any books for it. There are so many tutorials on the net with working examples with various levels of expertise on almost any topic that one wishes to program in when the scripting language is PHP…so I don’t see the point of wasting any money…regardless of how good the book is

  3. @Demond: I half agree with you. I taught myself PHP in my spare time so I agree with that point. I disagree that it’s a waste of money though — there are numerous tips in the book (and probably all PHP books) that I wish I knew right away!

  4. @Demond: While it’s true that you can learn everything you need to know about PHP online, its not necessarily the best way.

    The net is full of a lot of rubbish, and finding the good stuff amongst all the badly written stuff can be quite time consuming.

    A well written book can put all that in one place, and save you a lot of time searching.

    Personally I value my time more than my money, so I’ll always buy useful books like this to shortcut learning.

  5. Hmm, I wonder if you even check on comments on old posts, or if you just get notified of any comments whether they’re on old posts or new posts.

    So, I had this bookmarked for a long time, and after reading it once more I’ve decided it might be a bit too novice for me. I’m sure I’d learn a new thing here and there, but I’m not sure it would be enough to warrant buying the book over.

    I actually learned PHP from an eBook of PHP and MySQL for Dummies, and I pretty much taught myself everything else I know just from playing around browsing the PHP documentation, etc.

    Long winded, but any recommendations for a book that’s maybe a level or two up from this?

  6. @Will: I would recommend “PHP 5 in Practice (Developer’s Library) ” by Digg’s Eli White. I have it and it’s great. Check it out at your local book store before you buy it to make sure.

  7. I’ve been looking for reviews on PHP books and I’m looking for a great starter book to teach me the fundamentals. Assuming I know nothing, which would be a pretty good assumption, any recommendations?

    Very informative website, I check the RSS feed daily.

  8. Richard

    This is the best tech book I’ve ever “read” and I have read many. I wish all tech books were structured using the same technique and format. Are you thinking of writing a “Wicked Cool jQuery” book any time soon?

  9. I’m trying to go beyond WordPress and develop some real application driven websites, so I’ve been studying PHP for the last few months. It’s tough, because I’m not a programmer, but I am getting better. I picked up this book and at first I was impressed, but when trying to the various tutorials in the back, my opinion of the book went down a notch. However, I do plan to try and implement the simple blog and greeting card tutorials. The blog tutorial looked good, but it uses something called SMARTY which I’m not using in the site I’m building, so that through me for a loop. This book does have some nice info, but I’m still favoring Larry Ullman’s works (PHP, PHP 6 and MySQL 5, Advanced PHP) at this time.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!