PHP Cookbook: Need we say more?

July 28, 2009 at 10:27 am 18 comments

Well, those familiar with O’Reilly cookbook series really don’t need much explanation in order to get the right mindset before discussing the details of this book. If you’ve read other books in the “Cookbook” series from O’Reilly, you are probably already in love with some delicious “recipes,” but for those who are new to the ‘cooking’, here we go…

To put it short, we shall just say that the PHP Cookbook is an extremely well organized, massively useful, and easy to read impressive collection of problems, solutions, and practical examples for PHP developers, from novices to advanced practitioners.(Buy it on Amazon)

Just like a real cookbook used in the kitchen to prepare tasty food, this book provides a unique and extensive collection of best practices for everyday PHP programming dilemmas, so that instead of poking around mailing lists, online documentation, and other sources, you can rely on this book for quick and tested solutions to common problems, helping you spend your time on those out-of-the-ordinary problems specific to your application.

For every problem addressed in the book, there’s a worked-out solution or “recipe” — short, focused pieces of code that you can insert directly into your applications. But, do not let yourself be fooled, this book offers much more than just cut-and-paste code. You also get detailed explanations of how and why the code works, so you can learn to adapt the problem-solving techniques to similar situations.

The so called “recipes” in the PHP Cookbook range from simple tasks, such as sending a database query and fetching URLs, to entire programs that demonstrate complex tasks, such as printing HTML tables and generating bar charts. This book contains over 250 recipes — a treasure trove of useful code for PHP programmers, from novices to advanced practitioners. You can safely rely on the PHP Cookbook to provide quick solutions to common problems, so you can spend your time on those out-of-the-ordinary problems specific to your application.

The contents of this book are organized by language components, which makes it convenient to find what you are looking for. Within each chapter, are very specific problems and recipes which contain simple and short code snippets and a description of what it does. Most problems are solved within one page. It is really concise and to the point. The index is comprehensive so it is straightforward to lookup the issue you are having, find the problem / solution and get on with your coding. You don’t have to read through lots of code or descriptions of why somebody setup a display template or complicated object. Look up your problem, read a quick solution, and that’s that, you’re done and back to implementing it in your code.

The first six chapters provide recipes for more basic subjects (strings, numbers, dates & times, arrays, variables, and functions. By chapter seven the authors are discussing classes and objects, and serves as a great resource for all your OOP problems. The next nine chapters cover the usual web development stuff starting out with basic things like cookies, forms, and databases, and later into more advanced areas like session management, XML, automation and web services (REST, SOAP, Mail, FTP, LDAP, and DNS to name a few).

Chapter 17 focuses on the topic of graphics which is important if things like creating a button image on the fly, or generating charts suits your fancy. Chapter 18 is on security and encryption which is vital to every web developer who does not want his/her web application to be the link that allows data to be compromised (That should cover over 90 percent of us, right?…).

Chapter 19 covers localization, while chapter 20 is on debugging and testing. The debugging section does a great job of getting a person setup with the tools they need to properly debug an application including creating your own exception class. This is an outstanding chapter that every programmer can appreciate since every application needs debugging.

The remaining chapters cover performance tuning, regular expressions, files, directories, command line PHP, PERL and PECL.

Also, among the various topics discussed in this book, you will find information on the following:

  • Working with basic data types, including strings, numbers, dates and times, and arrays
  • PHP building blocks, such as variables, functions, classes, and objects
  • Web programming, including forms, database access, and XML
  • Useful features like regular expressions, encryption and security, graphics, internationalization and localization, and Internet services
  • Working with files and directories
  • Command-line PHP and PHP-GTK
  • PEAR, the PHP Extension and Application Repository

So, although we would not recommend this as your first programming book (except if you like to learn by jumping in head first, and diving straight into code examples) as it does assume some familiarity with programming concepts, it can and should, however, be your first PHP book, since this book is like having the answer key to most of the random questions a person comes up with when writing code.

We found this book to be very useful, and we believe it will be one of those references that you will keep close by on your desk. That is why we would strongly recommend it to any PHP developer that wants to move on to the next level.

Anyone who likes to learn by jumping in head first, and diving straight into code examples will be right at home with the PHP Cookbook. If you’ve read other books in the “Cookbook” series from O’Reilly, you’ll be familiar with the format: problem, solution, discussion.
Advertisements

Entry filed under: Books. Tags: , , .

Professional PHP6: professional to its max Professional Search Engine Optimization with PHP: A Fine Mix

18 Comments Add your own

  • 1. julio  |  July 28, 2009 at 11:40 am

    Buenos dias senor,

    can i download the book from the internet?

    Reply
    • 2. drupalmeister  |  July 29, 2009 at 1:19 pm

      Please check both Wiley and Amazon for a link to a PDF version of the book.

      Thanks.

      Reply
  • 3. Bubby, texas  |  July 28, 2009 at 12:14 pm

    Can you please eleborate on what level of experience is required in order to use this book?

    I’m by no means new to the language, but at the same time I can not state that I’m very experienced. Do you believe I will be able to get the ideas expressed in the book?

    Also, will you need to know any other languages prior to using this book? I don’t know much JavaScript. Will this present a problem?

    Thanks

    Reply
    • 4. drupalmeister  |  July 29, 2009 at 1:21 pm

      It is though to measure something when there are no units of measure… But I can say that if you are really comfortable with the language, you should have no problem picking up mostly everything in the book.

      Enjoy your copy, as much as we did ours.

      Reply
  • 5. jackser  |  July 28, 2009 at 12:56 pm

    thanks for the review. i hope to make this my next php book after i finish the other book from wrox you reviewed last month. thank you

    Reply
    • 6. drupalmeister  |  July 29, 2009 at 1:21 pm

      That’s a great choice you made. Congratulations.

      Reply
  • 7. 666xxxx  |  July 28, 2009 at 3:03 pm

    is da book different from the php.net manual?

    Reply
    • 8. drupalmeister  |  July 29, 2009 at 1:23 pm

      Well, while the PHP manual is a great resource, few people enjoy “reading” the manual, since the manual was set out as a reference book for specific functions, whereas this book is targeted to get your problems done in a quick and efficient manner.

      I would suggest you get the book, in order for you to appreciate the difference and experience “cookbook-style”. It just rocks.

      Reply
  • 9. crampBamp  |  July 29, 2009 at 8:24 am

    thanks

    Reply
  • 10. willyboy  |  July 29, 2009 at 5:19 pm

    good collection.

    Reply
  • 11. cxaxia  |  July 29, 2009 at 11:32 pm

    can someone explain what’s the difference between the cookbooks and the nutshells?

    Reply
  • 12. james  |  July 30, 2009 at 1:38 pm

    yeah, the cookbooks are all just great

    Reply
  • 13. shim_wheee  |  July 31, 2009 at 8:36 am

    Hey peeps,

    What’s animal is that on the cover there? Cute…

    Reply
  • 14. drupalmeister  |  July 31, 2009 at 4:42 pm

    Accoring to O’reilly, the animal on the cover of PHP Cookbook is a Galapagos land iguana (Conolophus subcristatus).

    Reply
  • 15. announymous  |  August 1, 2009 at 9:58 am

    can it be used for the exam?

    Reply
    • 16. drupalmeister  |  August 3, 2009 at 10:05 am

      If you are referring to the Zend exam, I would say you rather use the study guide that can be bought on the Zend site. Otherwise, this book is designed to solve problems rather that be a guide to any exam.

      Reply
  • 17. da_hill  |  August 2, 2009 at 4:59 pm

    Hi,

    I want a book on design patterns. is this topic included in the book?

    Reply
    • 18. drupalmeister  |  August 3, 2009 at 10:06 am

      No, this book is not about design patterns. We hope to cover such books in the near future though.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


RSS Drupal News

  • How to get your news and annoucement post promoted to the front page of Drupal.org July 13, 2008
    Use these guidelines when deciding whether a post should be promoted to the front page.Guidelines for promoting and demoting content to the front pageFront Page Schedule
    Amazon
  • Registration for DrupalCon Vienna is open June 5, 2017
    We're shouting it from the rooftops today. DrupalCon Vienna registration is now open. Early bird pricing is happening now until 4 August, but for the next two weeks only you can also get a conference t-shirt if you register and are a Drupal Association Individual Member. You can also receive a t-shirt if you sign up to be a sprint mentor, or you volunte […]
    lizzjoy
  • Nikki Stevens: Winner of the 2017 Aaron Winborn Award May 9, 2017
    The Aaron Winborn Award was created in 2015 after the loss of one of one of the Drupal community’s most prominent members, Aaron Winborn, to Amyotrophic Lateral Sclerosis (also referred to as Lou Gehrig's Disease in the US and Motor Neuron Disease in the UK). Aaron’s commitment to the Drupal project and community made him the epitome of our unofficial m […]
    emma.maria
  • Welcoming Rachel Lawson and Jordana Fung to the Drupal Community Working Group May 9, 2017
    The Drupal Community Working Group is pleased to announce the additions of Rachel Lawson and Jordana Fung. We began discussing the possibility of increasing the size and diversity of our group last year, and we are happy to take this important step. As both the community and the CWG evolve, we felt it was important to expand our numbers in order to better ha […]
    ultimike
  • State of Drupal Poll April 19, 2017
    There's a lot of FUD (fear, uncertainty and doubt) in the community these days. Let's try to quantify how people are feeling. Take the State of Drupal poll. Results will be tabulated and published during Drupalcon Baltimore. http://theaccidentalcoder.com/state-of-drupal-pollDrupal version: Drupal 8.x
    j. ayen green
  • New Drupal 8 Private Message module April 10, 2017
    I've just released a new private message module for Drupal 8. The module is currently in beta version, and needs some work for a full release. If anyone is interested in assisting in the remaining features for a full release, more information is available on the module page. https://www.drupal.org/project/private_message This module will be a full-featu […]
    Jaypan
  • Successfully ended long abusive relationship today ... March 13, 2017
    ... by moving my main website from Hostmonster across to SiteGround. I feel liberated.Drupal version: Drupal 7.x
    TWD
  • Url to Video Filter module February 10, 2017
    I've just released the Url to Video Filter module. This module creates an input filter that can be used in a text format, that will automatically parse YouTube and/or Vimeo URLs into embedded videos. This means that any field that uses text formats can have URLs directly pasted into the body, and the URL will be replaced with the relevant video.Drupal v […]
    Jaypan
  • Predictions for 2017 January 15, 2017
    Like last year around this date, it is the time of year where we predict what the future wil bring for Drupal. Will decoupled Drupal get a head start? Wil chatbots be written in Drupal, will our tool fuel the Internet of Things, will the Whitehouse still run Drupal and will there be an IPO of a Drupal company? Time to put your predictions, deep thoughts and […]
    bertboerland
  • New module: Mcdoolz Social January 13, 2017
    Hey folk; I released a sandbox project I call _social a few weeks ago and I'd like to take it to full project status but I felt I should let people try it out first. https://www.drupal.org/sandbox/mcdoolz/2840456 It is a social network links module for making linking to social networking pages super easy and client sustainable. It's not that social […]
    mcdoolz

%d bloggers like this: