Core PHP Programming: A New Perspective on Object-Oriented Design, 2nd edition
Authors: Leon Atkinson
Venue:  (2000)

From the Book:My first inkling that I might like to write a book about PHP was born out of the frustration I felt with the original PHP manual. It was a single, large HTML file with all the functions in alphabetical order. It was also on a Web server thousands of miles away from me in Canada, so it was slow to show up in my browser, even across a T1 connection. It wasn't long before it was saved on my desktop. After struggling for several months, it started to dawn on me that I could probably organize the information into a more usable format. Around that time the next version of PHP began to take shape, and with it a new manual was developed. It was organized around PHP's source code but was less complete than the old PHP manual. I contributed descriptions for some of the missing functions, but I still had the idea to write my own manual. In the spring of 1998 Prentice Hall PTR gave me the opportunity to do so. It is an honor for my book to be among Prentice Hall classics such as The C Programming Language by Brian Kernighan and Dennis Ritchie.This book assumes a certain familiarity with the Internet, the Web, and HTML programming, but it starts with the most basic ideas of programming. It will introduce you to concepts common to all programming languages and how they work in PHP. You can expect this book to teach you how to create rich, dynamic Web sites. You can also expect it to remain on your desk as a reference for how PHP works, or even as a recipe book for solving common design problems. This book is not for dummies, nor is it for complete idiots. That you are considering PHP is a great indication of your intelligence, and I'd hate toinsult it. Some of the ideas in this book are hard to understand. If you don't quite get them the first time, I encourage you to reread and experiment with the examples.If you are uncomfortable writing HTML files, you may wish to develop this skill first. Marty Hall's Core Web Programming provides an excellent introduction. Beyond HTML, numerous other topics I touch on fall out of scope. Whenever I can, I suggest books and Web sites that provide more information. There are even some aspects of PHP that range too far from the focus on writing PHP scripts. An example is writing extensions for PHP in C. This involves a healthy knowledge of C programming that I cannot provide here. Related to this is compiling and installing PHP. I attempt to describe the process of installing PHP, which can involve compiling the source code, but I can't attempt to pursue all the different combinations of operating system, Web servers, and extensions. If you are comfortable running make files, you will find the information that comes with the PHP source code more than adequate.Along with the explanation text I've provided real-world examples. Nothing is more frustrating than trying to adapt some contrived academic problem to the Web site you must have working by the end of the week. Some of the examples are based on code from live Web sites I have worked on since discovering PHP in 1997. Others are distilled from the continual discussion being conducted on the PHP mailing lists.This book is organized into four main sections: an introduction to programming; a reference for all the functions in PHP; a survey of common programming problems; and finally a guide for applying this knowledge to Web site development. The first section deals with the issues involved with any programming language: what a PHP script looks like; how to control execution; how to deal with data. The second section organizes the functions by what they do and gives examples of their use. PHP offers many functions, so this section is larger than the rest. The third section deals with solving common programming problems such as sorting and generating graphics. The last section offers advice about how to create a whole Web site with PHP.I've chosen a few conventions for highlighting certain information, and I'm sure you will find them obvious, but for the sake of clarity I'll spell them out. Whenever I use a keyword such as the name of a script or a function, I place it in a monospace font. For example, I may speak about the print function. Another convention I've used is to place email addresses and Web addresses inside angle brackets. Examples are the email address by which you can contact me, <corephp@leonatkinson.com>, and my Web site http://www.leonatkinson.com/.