Buying Options
Programming PHP
Safari Books Online
Add to Cart
What is this?

Product Editions

Please consider the latest edition.

  1. Programming PHP, Second Edition - April 2006
  2. Programming PHP - March 2002
Description
Programming PHP is a comprehensive guide to PHP, a simple yet powerful language for creating dynamic web content. Filled with the unique knowledge of the creator of PHP, Rasmus Lerdorf, this book is a detailed reference to the language and its applications, including such topics as form processing, sessions, databases, XML, and graphics. This book covers PHP 4.
Full Description
Table of Contents
  1. Chapter 1 Introduction to PHP

    1. What Does PHP Do?

    2. A Brief History of PHP

    3. Installing PHP

    4. A Walk Through PHP

  2. Chapter 2 Language Basics

    1. Lexical Structure

    2. Data Types

    3. Variables

    4. Expressions and Operators

    5. Flow-Control Statements

    6. Including Code

    7. Embedding PHP in Web Pages

  3. Chapter 3 Functions

    1. Calling a Function

    2. Defining a Function

    3. Variable Scope

    4. Function Parameters

    5. Return Values

    6. Variable Functions

    7. Anonymous Functions

  4. Chapter 4 Strings

    1. Quoting String Constants

    2. Printing Strings

    3. Accessing Individual Characters

    4. Cleaning Strings

    5. Encoding and Escaping

    6. Comparing Strings

    7. Manipulating and Searching Strings

    8. Regular Expressions

    9. POSIX-Style Regular Expressions

    10. Perl-Compatible Regular Expressions

  5. Chapter 5 Arrays

    1. Indexed Versus Associative Arrays

    2. Identifying Elements of an Array

    3. Storing Data in Arrays

    4. Multidimensional Arrays

    5. Extracting Multiple Values

    6. Converting Between Arrays and Variables

    7. Traversing Arrays

    8. Sorting

    9. Acting on Entire Arrays

    10. Using Arrays

  6. Chapter 6 Objects

    1. Terminology

    2. Creating an Object

    3. Accessing Properties and Methods

    4. Declaring a Class

    5. Introspection

    6. Serialization

  7. Chapter 7 Web Techniques

    1. HTTP Basics

    2. Variables

    3. Server Information

    4. Processing Forms

    5. Setting Response Headers

    6. Maintaining State

    7. SSL

  8. Chapter 8 Databases

    1. Using PHP to Access a Database

    2. Relational Databases and SQL

    3. PEAR DB Basics

    4. Advanced Database Techniques

    5. Sample Application

  9. Chapter 9 Graphics

    1. Embedding an Image in a Page

    2. The GD Extension

    3. Basic Graphics Concepts

    4. Creating and Drawing Images

    5. Images with Text

    6. Dynamically Generated Buttons

    7. Scaling Images

    8. Color Handling

  10. Chapter 10 PDF

    1. PDF Extensions

    2. Documents and Pages

    3. Text

    4. Images and Graphics

    5. Navigation

    6. Other PDF Features

  11. Chapter 11 XML

    1. Lightning Guide to XML

    2. Generating XML

    3. Parsing XML

    4. Transforming XML with XSLT

    5. Web Services

  12. Chapter 12 Security

    1. Global Variables and Form Data

    2. Filenames

    3. File Uploads

    4. File Permissions

    5. Concealing PHP Libraries

    6. PHP Code

    7. Shell Commands

    8. Security Redux

  13. Chapter 13 Application Techniques

    1. Code Libraries

    2. Templating Systems

    3. Handling Output

    4. Error Handling

    5. Performance Tuning

  14. Chapter 14 Extending PHP

    1. Architectural Overview

    2. What You'll Need

    3. Building Your First Extensions

    4. The config.m4 File

    5. Memory Management

    6. The pval/zval Data Type

    7. Parameter Handling

    8. Returning Values

    9. References

    10. Global Variables

    11. Creating Variables

    12. Extension INI Entries

    13. Resources

    14. Where to Go from Here

  15. Chapter 15 PHP on Windows

    1. Installing and Configuring PHP on Windows

    2. Writing Portable Code for Windows and Unix

    3. Interfacing with COM

    4. Interacting with ODBC Data Sources

  1. Appendix A Function Reference

    1. PHP Functions by Category

    2. Alphabetical Listing of PHP Functions (a-e)

    3. Alphabetical Listing of PHP Functions (f-i)

    4. Alphabetical Listing of PHP Functions (j-q)

    5. Alphabetical Listing of PHP Functions (r-z)

  2. Appendix B Extension Overview

    1. Optional Extensions Listing

  3. Colophon

View Full Table of Contents
Product Details
Title:
Programming PHP
By:
Rasmus Lerdorf, Kevin Tatroe
Publisher:
O'Reilly Media
Formats:
  • Print
  • Safari Books Online
Print Release:
March 2002
Pages:
528
Print ISBN:
978-1-56592-610-3
| ISBN 10:
1-56592-610-2
Customer Reviews
About the Authors
  1. Rasmus Lerdorf

    started the PHP Project back in 1995 and has been actively involved in PHP development ever since. Also involved in a number of other Open Source projects, Rasmus is a longtime Apache contributor and foundation member. He is the author of the first edition of the PHP Pocket Reference, and the co-author of Programming PHP.

    View Rasmus Lerdorf's full profile page.

  2. Kevin Tatroe

    Kevin Tatroe has been a Macintosh and Unix programmer for ten years. Being lazy, he's attracted to languages and frameworks that do much of the work for you, such as the AppleScript, Perl, and PHP languages and the WebObjects and Cocoa programming environments. Kevin, his wife Jenn, his son Hadden, and two cats live on the edge of the rural plains of Colorado, just far away enough from the mountains to avoid the worst snowfall, and just close enough to avoid tornadoes. The house is filled with LEGO creations, action figures, and other toys.

    View Kevin Tatroe's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Programming PHP is a cuckoo (Cuculus canorus). Cuckoos epitomize minimal effort. The common cuckoo doesn't build a nest-instead, the female cuckoo finds another bird's nest that already contains eggs and lays an egg in it (a process she may repeat up to 25 times, leaving 1 egg per nest). The nest mother rarely notices the addition, and usually incubates the egg and then feeds the hatchling as if it were her own. Why don't nest mothers notice that the cuckoo's eggs are different from their own? Recent research suggests that it's because the eggs look the same in the ultraviolet spectrum, which birds can see.

When they hatch, the baby cuckoos push all the other eggs out of the nest. If the other eggs hatched first, the babies are pushed out too. The host parents often continue to feed the cuckoo even after it grows to be much larger than they are, and cuckoo chicks sometimes use their call to lure other birds to feed them as well. Interestingly, only Old World (European) cuckoos colonize other nests-the New World (American) cuckoos build their own (untidy) nests. Like many Americans, these cuckoos migrate to the tropics for winter.

Cuckoos have a long and glorious history in literature and the arts. The Bible mentions them, as do Pliny and Aristotle. Beethoven used the cuckoo's distinctive call in his Pastoral Symphony. And here's a bit of etymology for you: the word "cuckold" (a husband whose wife is cheating on him) comes from "cuckoo." Presumably, the practice of laying one's eggs in another's nest seemed an appropriate metaphor. Rachel Wheeler was the production editor and copyeditor for Programming PHP. Sue Willing and Jeffrey Holcomb provided quality control, and Sue Willing provided production assistance. Ellen Troutman-Zaig wrote the index.

Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

Melanie Wang designed the interior layout, based on a series design by David Futato. Neil Walls converted the files from Microsoft Word to FrameMaker 5.5.6 using tools created by Mike Sierra. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Nathan Torkington and Rachel Wheeler.

  • Book cover of Programming PHP