PHP is a simple yet powerful open-source scripting language for creating dynamic web content. The millions of web sites powered by PHP are testament to its popularity and ease of use. PHP is used by both programmers, who appreciate its flexibility and speed, and web designers, who value its accessibility and convenience. Programming PHP is an authoritative guide to PHP 4 and is filled with the unique knowledge of the creator of PHP, Rasmus Lerdorf. This book explains PHP language syntax and programming techniques in a clear and concise manner, with numerous examples that illustrate both correct usage and common idioms. The book also includes style tips and practical programming advice that will help you become not just a PHP programmer, but a good PHP programmer. Programming PHP covers everything you need to know to create effective web applications with PHP. Contents include:
- Detailed information on the basics of the PHP language, including data types, variables, operators, and flow control statements
- Separate chapters on the fundamental topics of functions, strings, arrays, and objects
- Coverage of common PHP web application techniques, such as form processing and validation, session tracking, and cookies
- Material on interacting with relational databases, such as MySQL and Oracle, using the database-independent PEAR DB library
- Chapters on generating dynamic images, creating PDF files, and parsing XML files with PHP
- Advanced topics, like creating secure script, error handling, performance tuning, and writing your own C language extensions to PHP
- A handy quick reference to all the core functions in PHP and all the standard extensions that ship with PHP
Coauthored by its creator,
Programming PHP is a nitty-gritty guide to PHP development. PHP is an open-source scripting language used to build dynamic Web sites. In this title, the authors go step-by-step through the language, including brief coverage of common applications such as graphics or database work.
The first six chapters explain PHP essentials, including data types, functions, string manipulation, arrays and objects. Next comes a look at basic Web techniques, followed by an introduction to database access. There is a chapter on generating graphics with the GD extension library and another on creating Adobe PDF documents. The authors then show how to parse XML, and there is a section on security with some handy tips for protecting PHP sites. A chapter on application techniques looks at code libraries, performance tuning and handling errors. Next there is an explanation of how to build extensions to PHP using C, followed by a look at Windows issues such as COM and ODBC. Finally, there is a complete reference to the standard functions in PHP 4.0.
This is not an advanced programming book, but even experienced coders will discover new things about the language and get a clearer understanding of how PHP works. The specialist chapters such as those on XML or PHP extensions tend to be introductory, so readers will need further resources. For example, the database section is short, and would be best read alongside Web Database Applications with PHP and MySQL or another book with more detailed database coverage. Even so, this is a strong hands-on title that PHP developers will want to keep close at hand. ----Tim Anderson