You are previewing Programming PHP, 2nd Edition.
O'Reilly logo
Programming PHP, 2nd Edition

Book Description

Programming PHP, 2nd Edition, is the authoritative guide to PHP 5 and is filled with the unique knowledge of the creator of PHP (Rasmus Lerdorf) and other PHP experts. When it comes to creating websites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million websites, surpassing Microsoft's ASP .NET technology in popularity. Programmers love its flexibility and speed; designers love its accessibility and convenience.

As the industry standard book on PHP, all of the essentials are covered in a clear and concise manner. Language syntax and programming techniques are coupled with numerous examples that illustrate both correct usage and common idioms. With style tips and practical programming advice, this book will help you become not just a PHP programmer, but a good PHP programmer. Programming PHP, Second Edition 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

  • Chapters outlining the basics 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 and the new PDO Library

  • Chapters that show you how to generate dynamic images, create PDF files, and parse XML files with PHP

  • Advanced topics, such as creating secure scripts, 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

  • Praise for the first edition:

    "If you are just getting into the dynamic Web development world or you are considering migrating from another dynamic web product to PHP, Programming PHP is the book of choice to get you up, running, and productive in a short time."

    --Peter MacIntrye, eWeek

    "I think this is a great book for programmers who want to start developing dynamic websites with PHP. It gives a detailed overview of PHP, lots of valuable tips, and a good sense of PHP's strengths."

    --David Dooling, Slashdot.org

    Table of Contents

    1. Programming PHP, 2nd Edition
    2. A Note Regarding Supplemental Files
    3. Foreword
    4. Preface
      1. Audience
      2. Assumptions This Book Makes
      3. Contents of This Book
      4. Conventions Used in This Book
      5. Using Code Examples
      6. Comments and Questions
      7. SafariĀ® Enabled
      8. Acknowledgments
        1. Rasmus Lerdorf
        2. Kevin Tatroe
        3. Peter MacIntyre
          1. Dedication
    5. 1. Introduction to PHP
      1. 1.1. What Does PHP Do?
      2. 1.2. A Brief History of PHP
        1. 1.2.1. The Evolution of PHP
        2. 1.2.2. The Growth of PHP
      3. 1.3. Installing PHP
      4. 1.4. A Walk Through PHP
        1. 1.4.1. Configuration Page
        2. 1.4.2. Forms
        3. 1.4.3. Databases
        4. 1.4.4. Graphics
        5. 1.4.5. From the Shell
    6. 2. Language Basics
      1. 2.1. Lexical Structure
        1. 2.1.1. Case Sensitivity
        2. 2.1.2. Statements and Semicolons
        3. 2.1.3. Whitespace and Line Breaks
        4. 2.1.4. Comments
          1. 2.1.4.1. Shell-style comments
          2. 2.1.4.2. C++ comments
          3. 2.1.4.3. C comments
        5. 2.1.5. Literals
        6. 2.1.6. Identifiers
          1. 2.1.6.1. Variable names
          2. 2.1.6.2. Function names
          3. 2.1.6.3. Class names
          4. 2.1.6.4. Constants
        7. 2.1.7. Keywords
      2. 2.2. Data Types
        1. 2.2.1. Integers
        2. 2.2.2. Floating-Point Numbers
        3. 2.2.3. Strings
        4. 2.2.4. Booleans
        5. 2.2.5. Arrays
        6. 2.2.6. Objects
        7. 2.2.7. Resources
        8. 2.2.8. NULL
      3. 2.3. Variables
        1. 2.3.1. Variable Variables
        2. 2.3.2. Variable References
        3. 2.3.3. Variable Scope
          1. 2.3.3.1. Local scope
          2. 2.3.3.2. Global scope
          3. 2.3.3.3. Static variables
          4. 2.3.3.4. Function parameters
        4. 2.3.4. Garbage Collection
      4. 2.4. Expressions and Operators
        1. 2.4.1. Number of Operands
        2. 2.4.2. Operator Precedence
        3. 2.4.3. Operator Associativity
        4. 2.4.4. Implicit Casting
        5. 2.4.5. Arithmetic Operators
        6. 2.4.6. String Concatenation Operator
        7. 2.4.7. Autoincrement and Autodecrement Operators
        8. 2.4.8. Comparison Operators
        9. 2.4.9. Bitwise Operators
        10. 2.4.10. Logical Operators
        11. 2.4.11. Casting Operators
        12. 2.4.12. Assignment Operators
          1. 2.4.12.1. Assignment
          2. 2.4.12.2. Assignment with operation
        13. 2.4.13. Miscellaneous Operators
      5. 2.5. Flow-Control Statements
        1. 2.5.1. if
        2. 2.5.2. switch
        3. 2.5.3. while
        4. 2.5.4. for
        5. 2.5.5. foreach
        6. 2.5.6. declare
        7. 2.5.7. exit and return
      6. 2.6. Including Code
      7. 2.7. Embedding PHP in Web Pages
        1. 2.7.1. XML Style
        2. 2.7.2. SGML Style
        3. 2.7.3. ASP Style
        4. 2.7.4. Script Style
        5. 2.7.5. Echoing Content Directly
    7. 3. Functions
      1. 3.1. Calling a Function
      2. 3.2. Defining a Function
      3. 3.3. Variable Scope
        1. 3.3.1. Global Variables
        2. 3.3.2. Static Variables
      4. 3.4. Function Parameters
        1. 3.4.1. Passing Parameters by Value
        2. 3.4.2. Passing Parameters by Reference
        3. 3.4.3. Default Parameters
        4. 3.4.4. Variable Parameters
        5. 3.4.5. Missing Parameters
      5. 3.5. Return Values
      6. 3.6. Variable Functions
      7. 3.7. Anonymous Functions
    8. 4. Strings
      1. 4.1. Quoting String Constants
        1. 4.1.1. Variable Interpolation
        2. 4.1.2. Single-Quoted Strings
        3. 4.1.3. Double-Quoted Strings
        4. 4.1.4. Here Documents
      2. 4.2. Printing Strings
        1. 4.2.1. echo
        2. 4.2.2. print( )
        3. 4.2.3. printf( )
          1. 4.2.3.1. Format modifiers
          2. 4.2.3.2. Type specifiers
        4. 4.2.4. print_r( ) and var_dump( )
      3. 4.3. Accessing Individual Characters
      4. 4.4. Cleaning Strings
        1. 4.4.1. Removing Whitespace
        2. 4.4.2. Changing Case
      5. 4.5. Encoding and Escaping
        1. 4.5.1. HTML
          1. 4.5.1.1. Entity-quoting all special characters
          2. 4.5.1.2. Entity-quoting only HTML syntax characters
          3. 4.5.1.3. Removing HTML tags
          4. 4.5.1.4. Extracting meta tags
        2. 4.5.2. URLs
          1. 4.5.2.1. RFC 1738 encoding and decoding
          2. 4.5.2.2. Query-string encoding
        3. 4.5.3. SQL
        4. 4.5.4. C-String Encoding
      6. 4.6. Comparing Strings
        1. 4.6.1. Exact Comparisons
        2. 4.6.2. Approximate Equality
      7. 4.7. Manipulating and Searching Strings
        1. 4.7.1. Substrings
        2. 4.7.2. Miscellaneous String Functions
        3. 4.7.3. Decomposing a String
          1. 4.7.3.1. Exploding and imploding
          2. 4.7.3.2. Tokenizing
          3. 4.7.3.3. sscanf( )
        4. 4.7.4. String-Searching Functions
          1. 4.7.4.1. Searches returning position
          2. 4.7.4.2. Searches returning rest of string
          3. 4.7.4.3. Searches using masks
          4. 4.7.4.4. Decomposing URLs
      8. 4.8. Regular Expressions
        1. 4.8.1. The Basics
        2. 4.8.2. Character Classes
        3. 4.8.3. Alternatives
        4. 4.8.4. Repeating Sequences
        5. 4.8.5. Subpatterns
      9. 4.9. POSIX-Style Regular Expressions
        1. 4.9.1. Character Classes
        2. 4.9.2. Anchors
        3. 4.9.3. Functions
          1. 4.9.3.1. Matching
          2. 4.9.3.2. Replacing
          3. 4.9.3.3. Splitting
      10. 4.10. Perl-Compatible Regular Expressions
        1. 4.10.1. Delimiters
        2. 4.10.2. Match Behavior
        3. 4.10.3. Character Classes
        4. 4.10.4. Anchors
        5. 4.10.5. Quantifiers and Greed
        6. 4.10.6. Non-Capturing Groups
        7. 4.10.7. Backreferences
        8. 4.10.8. Trailing Options
        9. 4.10.9. Inline Options
        10. 4.10.10. Lookahead and Lookbehind
        11. 4.10.11. Cut
        12. 4.10.12. Conditional Expressions
        13. 4.10.13. Functions
          1. 4.10.13.1. Matching
          2. 4.10.13.2. Replacing
          3. 4.10.13.3. Splitting
          4. 4.10.13.4. Filtering an array with a regular expression
          5. 4.10.13.5. Quoting for regular expressions
        14. 4.10.14. Differences from Perl Regular Expressions
    9. 5. Arrays
      1. 5.1. Indexed Versus Associative Arrays
      2. 5.2. Identifying Elements of an Array
      3. 5.3. Storing Data in Arrays
        1. 5.3.1. Adding Values to the End of an Array
        2. 5.3.2. Assigning a Range of Values
        3. 5.3.3. Getting the Size of an Array
        4. 5.3.4. Padding an Array
      4. 5.4. Multidimensional Arrays
      5. 5.5. Extracting Multiple Values
        1. 5.5.1. Slicing an Array
        2. 5.5.2. Splitting an Array into Chunks
        3. 5.5.3. Keys and Values
        4. 5.5.4. Checking Whether an Element Exists
        5. 5.5.5. Removing and Inserting Elements in an Array
      6. 5.6. Converting Between Arrays and Variables
        1. 5.6.1. Creating Variables from an Array
        2. 5.6.2. Creating an Array from Variables
      7. 5.7. Traversing Arrays
        1. 5.7.1. The foreach Construct
        2. 5.7.2. The Iterator Functions
        3. 5.7.3. Using a for Loop
        4. 5.7.4. Calling a Function for Each Array Element
        5. 5.7.5. Reducing an Array
        6. 5.7.6. Searching for Values
      8. 5.8. Sorting
        1. 5.8.1. Sorting One Array at a Time
        2. 5.8.2. Natural-Order Sorting
        3. 5.8.3. Sorting Multiple Arrays at Once
        4. 5.8.4. Reversing Arrays
        5. 5.8.5. Randomizing Order
      9. 5.9. Acting on Entire Arrays
        1. 5.9.1. Calculating the Sum of an Array
        2. 5.9.2. Merging Two Arrays
        3. 5.9.3. Calculating the Difference Between Two Arrays
        4. 5.9.4. Filtering Elements from an Array
      10. 5.10. Using Arrays
        1. 5.10.1. Sets
        2. 5.10.2. Stacks
    10. 6. Objects
      1. 6.1. Terminology
      2. 6.2. Creating an Object
      3. 6.3. Accessing Properties and Methods
      4. 6.4. Declaring a Class
        1. 6.4.1. Declaring Methods
        2. 6.4.2. Declaring Properties
        3. 6.4.3. Declaring Constants
        4. 6.4.4. Inheritance
        5. 6.4.5. Interfaces
        6. 6.4.6. Abstract Methods
        7. 6.4.7. Constructors
        8. 6.4.8. Destructors
      5. 6.5. Introspection
        1. 6.5.1. Examining Classes
        2. 6.5.2. Examining an Object
        3. 6.5.3. Sample Introspection Program
      6. 6.6. Serialization
    11. 7. Web Techniques
      1. 7.1. HTTP Basics
      2. 7.2. Variables
      3. 7.3. Server Information
      4. 7.4. Processing Forms
        1. 7.4.1. Methods
        2. 7.4.2. Parameters
        3. 7.4.3. Automatic Quoting of Parameters
        4. 7.4.4. Self-Processing Pages
        5. 7.4.5. Sticky Forms
        6. 7.4.6. Multivalued Parameters
        7. 7.4.7. Sticky Multivalued Parameters
        8. 7.4.8. File Uploads
        9. 7.4.9. Form Validation
      5. 7.5. Setting Response Headers
        1. 7.5.1. Different Content Types
        2. 7.5.2. Redirections
        3. 7.5.3. Expiration
        4. 7.5.4. Authentication
      6. 7.6. Maintaining State
        1. 7.6.1. Cookies
        2. 7.6.2. Sessions
          1. 7.6.2.1. Session basics
          2. 7.6.2.2. Alternatives to cookies
          3. 7.6.2.3. Custom storage
        3. 7.6.3. Combining Cookies and Sessions
      7. 7.7. SSL
    12. 8. Databases
      1. 8.1. Using PHP to Access a Database
      2. 8.2. Relational Databases and SQL
      3. 8.3. PEAR DB Basics
        1. 8.3.1. Data Source Names
        2. 8.3.2. Connecting
        3. 8.3.3. Error Checking
        4. 8.3.4. Issuing a Query
        5. 8.3.5. Fetching Results from a Query
          1. 8.3.5.1. Returning the row
          2. 8.3.5.2. Storing the row
          3. 8.3.5.3. Inside a row array
          4. 8.3.5.4. Finishing the result
        6. 8.3.6. Disconnecting
      4. 8.4. Advanced Database Techniques
        1. 8.4.1. Placeholders
        2. 8.4.2. Prepare/Execute
        3. 8.4.3. Shortcuts
        4. 8.4.4. Details About a Query Response
        5. 8.4.5. Sequences
        6. 8.4.6. Metadata
        7. 8.4.7. Transactions
      5. 8.5. Sample Application
        1. 8.5.1. Database Tables
        2. 8.5.2. Database Connection
        3. 8.5.3. Administrator's Page
        4. 8.5.4. Adding a Business
        5. 8.5.5. Displaying the Database
        6. 8.5.6. PHP Data Objects
          1. 8.5.6.1. Making a connection
          2. 8.5.6.2. Interaction with the database
          3. 8.5.6.3. PDO and prepared statements
    13. 9. Graphics
      1. 9.1. Embedding an Image in a Page
      2. 9.2. The GD Extension
      3. 9.3. Basic Graphics Concepts
      4. 9.4. Creating and Drawing Images
        1. 9.4.1. The Structure of a Graphics Program
        2. 9.4.2. Changing the Output Format
        3. 9.4.3. Testing for Supported Image Formats
        4. 9.4.4. Reading an Existing File
        5. 9.4.5. Basic Drawing Functions
      5. 9.5. Images with Text
        1. 9.5.1. Fonts
        2. 9.5.2. TrueType Fonts
      6. 9.6. Dynamically Generated Buttons
        1. 9.6.1. Caching the Dynamically Generated Buttons
        2. 9.6.2. A Faster Cache
      7. 9.7. Scaling Images
      8. 9.8. Color Handling
        1. 9.8.1. Using the Alpha Channel
        2. 9.8.2. Identifying Colors
        3. 9.8.3. True Color Color Indexes
        4. 9.8.4. Text Representation of an Image
    14. 10. PDF
      1. 10.1. PDF Extensions
      2. 10.2. Documents and Pages
        1. 10.2.1. A Simple Example
        2. 10.2.2. Initializing the Document
        3. 10.2.3. Outputting Basic Text - Cells
      3. 10.3. Text
        1. 10.3.1. Coordinates
        2. 10.3.2. Text Attributes
        3. 10.3.3. Page Headers, Footers, and Class Extension
        4. 10.3.4. Images and Links
        5. 10.3.5. Tables and Data
    15. 11. XML
      1. 11.1. Lightning Guide to XML
      2. 11.2. Generating XML
      3. 11.3. Parsing XML
        1. 11.3.1. Element Handlers
        2. 11.3.2. Character Data Handler
        3. 11.3.3. Processing Instructions
        4. 11.3.4. Entity Handlers
          1. 11.3.4.1. External entities
          2. 11.3.4.2. Unparsed entities
        5. 11.3.5. Default Handler
        6. 11.3.6. Options
          1. 11.3.6.1. Character encoding
          2. 11.3.6.2. Case folding
        7. 11.3.7. Using the Parser
        8. 11.3.8. Errors
        9. 11.3.9. Methods as Handlers
        10. 11.3.10. Sample Parsing Application
      4. 11.4. Parsing XML with DOM
      5. 11.5. Parsing XML with SimpleXML
      6. 11.6. Transforming XML with XSLT
      7. 11.7. Web Services
        1. 11.7.1. Servers
        2. 11.7.2. Clients
    16. 12. Security
      1. 12.1. Filter Input
        1. 12.1.1. SQL Injection
      2. 12.2. Escape Output
        1. 12.2.1. Filenames
          1. 12.2.1.1. Check for relative paths
      3. 12.3. Cross-Site Scripting
      4. 12.4. Session Fixation
      5. 12.5. File Uploads
        1. 12.5.1. Distrust Browser-Supplied Filenames
        2. 12.5.2. Beware of Filling Your Filesystem
        3. 12.5.3. Surviving register_globals
      6. 12.6. File Access
        1. 12.6.1. Restrict Filesystem Access to a Specific Directory
        2. 12.6.2. Get It Right the First Time
        3. 12.6.3. Don't Use Files
        4. 12.6.4. Session Files
        5. 12.6.5. Concealing PHP Libraries
      7. 12.7. PHP Code
      8. 12.8. Shell Commands
      9. 12.9. More Information
      10. 12.10. Security Recap
    17. 13. Application Techniques
      1. 13.1. Code Libraries
      2. 13.2. Templating Systems
      3. 13.3. Handling Output
        1. 13.3.1. Output Buffering
        2. 13.3.2. Compressing Output
      4. 13.4. Error Handling
        1. 13.4.1. Error Reporting
        2. 13.4.2. Error Suppression
        3. 13.4.3. Triggering Errors
        4. 13.4.4. Defining Error Handlers
          1. 13.4.4.1. Logging in error handlers
          2. 13.4.4.2. Output buffering in error handlers
      5. 13.5. Performance Tuning
        1. 13.5.1. Benchmarking
        2. 13.5.2. Profiling
        3. 13.5.3. Optimizing Execution Time
        4. 13.5.4. Optimizing Memory Requirements
        5. 13.5.5. Reverse Proxies and Replication
          1. 13.5.5.1. Reverse-proxy cache
          2. 13.5.5.2. Load balancing and redirection
          3. 13.5.5.3. MySQL replication
          4. 13.5.5.4. Putting it all together
    18. 14. Extending PHP
      1. 14.1. Architectural Overview
      2. 14.2. What You'll Need
        1. 14.2.1. The PHP Source
        2. 14.2.2. Software Tools
      3. 14.3. Building Your First Extensions
        1. 14.3.1. Command-Line PHP
        2. 14.3.2. Planning Your Extension
        3. 14.3.3. Creating a Skeleton Extension
        4. 14.3.4. Fleshing Out the Skeleton
        5. 14.3.5. Compiling Your Extension
          1. 14.3.5.1. Standalone extensions
          2. 14.3.5.2. Compiling the extension into PHP
        6. 14.3.6. Testing Your Extension
      4. 14.4. The config.m4 File
        1. 14.4.1. No External Dependencies
        2. 14.4.2. External Dependencies
      5. 14.5. Memory Management
      6. 14.6. The pval /zval Data Type
        1. 14.6.1. MAKE_STD_ZVAL( )
        2. 14.6.2. SEPARATE_ZVAL( )
        3. 14.6.3. zval_copy_ctor( )
        4. 14.6.4. Accessor Macros
      7. 14.7. Parameter Handling
        1. 14.7.1. A Simple Example
        2. 14.7.2. A More Complex Example
        3. 14.7.3. An Example with Variable Argument List
      8. 14.8. Returning Values
        1. 14.8.1. Simple Types
        2. 14.8.2. Arrays
        3. 14.8.3. Objects
      9. 14.9. References
      10. 14.10. Global Variables
        1. 14.10.1. SAPI Globals (SG)
        2. 14.10.2. Executor Globals (EG )
        3. 14.10.3. Internal Extension Globals
      11. 14.11. Creating Variables
      12. 14.12. Extension INI Entries
      13. 14.13. Resources
      14. 14.14. Where to Go from Here
    19. 15. PHP on Windows
      1. 15.1. Installing and Configuring PHP on Windows
        1. 15.1.1. Going Straight to the Source
        2. 15.1.2. Configuring PHP with a Web Server
          1. 15.1.2.1. Configuration common to all Microsoft installations
          2. 15.1.2.2. Manually configuring Apache
          3. 15.1.2.3. Other installers and prepackaged distributions
        3. 15.1.3. Adding Extensions to the Base Distribution
        4. 15.1.4. Adding the MySQL Extension
      2. 15.2. Writing Portable Code for Windows and Unix
        1. 15.2.1. Determining the Platform
        2. 15.2.2. Handling Paths Across Platforms
        3. 15.2.3. The Environment
        4. 15.2.4. Sending Mail
        5. 15.2.5. End-of-Line Handling
        6. 15.2.6. End-of-File Handling
        7. 15.2.7. External Commands
        8. 15.2.8. Common Platform-Specific Extensions
      3. 15.3. Interfacing with COM
        1. 15.3.1. Background
        2. 15.3.2. PHP Functions
        3. 15.3.3. Determining the API
        4. 15.3.4. Completing a Word Document
      4. 15.4. Interacting with ODBC Data Sources
        1. 15.4.1. Configuring a DSN
        2. 15.4.2. Working with Access
    20. A. Function Reference
      1. A.1. PHP Functions by Category
        1. A.1.1. Arrays
        2. A.1.2. Classes and Objects
        3. A.1.3. Date and Time
        4. A.1.4. Errors and Logging
        5. A.1.5. Files, Directories, and Filesystem
        6. A.1.6. Functions
        7. A.1.7. HTTP
        8. A.1.8. Images
        9. A.1.9. Mail
        10. A.1.10. Math
        11. A.1.11. Network
        12. A.1.12. Output Control
        13. A.1.13. PHP Options/Info
        14. A.1.14. Program Execution
        15. A.1.15. Strings
        16. A.1.16. Type Functions
        17. A.1.17. URLs
        18. A.1.18. Variable Functions
      2. A.2. Alphabetical Listing of PHP Functions
        1. abs
        2. acos
        3. acosh
        4. addcslashes
        5. addslashes
        6. Array
        7. array_change_key_case
        8. array_chunk
        9. array_combine
        10. array_count_values
        11. array_diff
        12. array_diff_assoc
        13. array_diff_uassoc
        14. array_fill
        15. array_filter
        16. array_flip
        17. array_intersect
        18. array_intersect_assoc
        19. array_intersect_uassoc
        20. array_key_exists
        21. array_keys
        22. array_map
        23. array_merge
        24. array_merge_recursive
        25. array_multisort
        26. array_pad
        27. array_pop
        28. array_push
        29. array_rand
        30. array_reduce
        31. array_reverse
        32. array_search
        33. array_shift
        34. array_slice
        35. array_splice
        36. array_sum
        37. array_udiff
        38. array_udiff_assoc
        39. array_udiff_uassoc
        40. array_uintersect
        41. array_uintersect_assoc
        42. array_uintersect_uassoc
        43. array_unique
        44. array_unshift
        45. array_values
        46. array_walk
        47. array_walk_recursive
        48. arsort
        49. asin
        50. asinh
        51. asort
        52. assert
        53. assert_options
        54. atan
        55. atan2
        56. atanh
        57. base64_decode
        58. base64_encode
        59. base_convert
        60. basename
        61. bin2hex
        62. bindec
        63. call_user_func
        64. call_user_func_array
        65. call_user_method
        66. call_user_method_array
        67. ceil
        68. chdir
        69. checkdate
        70. checkdnsrr
        71. chgrp
        72. chmod
        73. chop
        74. chown
        75. chr
        76. chroot
        77. chunk_split
        78. class_exists
        79. class_implements
        80. class_parents
        81. clearstatcache
        82. closedir
        83. closelog
        84. compact
        85. connection_aborted
        86. connection_status
        87. constant
        88. convert_cyr_string
        89. convert_uudecode
        90. convert_uuencode
        91. copy
        92. cos
        93. cosh
        94. count
        95. count_chars
        96. crc32
        97. create_function
        98. crypt
        99. ctype_alnum
        100. ctype_alpha
        101. ctype_cntrl
        102. ctype_digit
        103. ctype_graph
        104. ctype_lower
        105. ctype_print
        106. ctype_punct
        107. ctype_space
        108. ctype_upper
        109. ctype_xdigit
        110. current
        111. date
        112. date_sunrise
        113. date_sunset
        114. debug_backtrace
        115. debug_print_backtrace
        116. decbin
        117. dechex
        118. decoct
        119. define
        120. defined
        121. define_syslog_variables
        122. deg2rad
        123. dir
        124. dirname
        125. diskfreespace
        126. disk_free_space
        127. disk_total_space
        128. dl
        129. dns_check_record
        130. dns_get_mx
        131. doubleval
        132. each
        133. echo
        134. empty
        135. end
        136. ereg
        137. ereg_replace
        138. eregi
        139. eregi_replace
        140. error_log
        141. error_reporting
        142. escapeshellarg
        143. escapeshellcmd
        144. exec
        145. exp
        146. explode
        147. extension_loaded
        148. extract
        149. fclose
        150. feof
        151. fflush
        152. fgetc
        153. fgetcsv
        154. fgets
        155. fgetss
        156. file
        157. file_exists
        158. fileatime
        159. filectime
        160. file_get_contents
        161. filegroup
        162. fileinode
        163. filemtime
        164. fileowner
        165. fileperms
        166. file_put_contents
        167. filesize
        168. filetype
        169. floatval
        170. flock
        171. floor
        172. flush
        173. fmod
        174. fnmatch
        175. fopen
        176. fpassthru
        177. fprintf
        178. fputs
        179. fread
        180. fscanf
        181. fseek
        182. fsockopen
        183. fstat
        184. ftell
        185. ftruncate
        186. func_get_arg
        187. func_get_args
        188. func_num_args
        189. function_exists
        190. fwrite
        191. get_browser
        192. get_cfg_var
        193. get_class
        194. get_class_methods
        195. get_class_vars
        196. get_current_user
        197. get_declared_classes
        198. get_declared_interfaces
        199. get_defined_constants
        200. get_defined_functions
        201. get_defined_vars
        202. get_extension_funcs
        203. get_headers
        204. get_html_translation_table
        205. getimagesize
        206. get_included_files
        207. get_include_path
        208. get_loaded_extensions
        209. get_magic_quotes_gpc
        210. get_magic_quotes_runtime
        211. get_meta_tags
        212. getmygid
        213. getmyuid
        214. get_object_vars
        215. get_parent_class
        216. get_required_files
        217. get_resource_type
        218. getcwd
        219. getdate
        220. getenv
        221. gethostbyaddr
        222. gethostbyname
        223. gethostbynamel
        224. getlastmod
        225. getmxrr
        226. getmyinode
        227. getmypid
        228. getprotobyname
        229. getprotobynumber
        230. getrandmax
        231. getrusage
        232. getservbyname
        233. getservbyport
        234. gettimeofday
        235. gettype
        236. glob
        237. gmdate
        238. gmmktime
        239. gmstrftime
        240. header
        241. headers_list
        242. headers_sent
        243. hebrev
        244. hebrevc
        245. hexdec
        246. highlight_file
        247. highlight_string
        248. htmlentities
        249. html_entity_decode
        250. htmlspecialchars
        251. http_build_query
        252. hypot
        253. idate
        254. ignore_user_abort
        255. image_type_to_mime_type
        256. implode
        257. import_request_variables
        258. in_array
        259. ini_alter
        260. ini_get
        261. ini_get_all
        262. ini_restore
        263. ini_set
        264. interface_exists
        265. intval
        266. ip2long
        267. iptcparse
        268. is_a
        269. is_array
        270. is_bool
        271. is_callable
        272. is_dir
        273. is_double
        274. is_executable
        275. is_file
        276. is_finite
        277. is_float
        278. is_infinite
        279. is_int
        280. is_integer
        281. is_link
        282. is_long
        283. is_nan
        284. is_null
        285. is_numeric
        286. is_object
        287. is_readable
        288. is_real
        289. is_resource
        290. is_scalar
        291. is_string
        292. is_subclass_of
        293. is_uploaded_file
        294. is_writable
        295. is_writeable
        296. isset
        297. join
        298. key
        299. krsort
        300. ksort
        301. lcg_value
        302. levenshtein
        303. link
        304. linkinfo
        305. list
        306. localeconv
        307. localtime
        308. log
        309. log10
        310. log1p
        311. long2ip
        312. lstat
        313. ltrim
        314. mail
        315. max
        316. md5
        317. md5_file
        318. metaphone
        319. method_exists
        320. microtime
        321. min
        322. mkdir
        323. mktime
        324. money_format
        325. move_uploaded_file
        326. mt_getrandmax
        327. mt_rand
        328. mt_srand
        329. natcasesort
        330. natsort
        331. next
        332. nl_langinfo
        333. nl2br
        334. number_format
        335. ob_clean
        336. ob_end_clean
        337. ob_end_flush
        338. ob_flush
        339. ob_get_clean
        340. ob_get_contents
        341. ob_get_flush
        342. ob_get_length
        343. ob_get_level
        344. ob_gzhandler
        345. ob_implicit_flush
        346. ob_list_handlers
        347. ob_start
        348. octdec
        349. opendir
        350. openlog
        351. ord
        352. output_add_rewrite_var
        353. output_reset_rewrite_vars
        354. pack
        355. parse_ini_file
        356. parse_str
        357. parse_url
        358. passthru
        359. pathinfo
        360. pclose
        361. pfsockopen
        362. php_ini_scanned_files
        363. php_logo_guid
        364. php_sapi_name
        365. php_uname
        366. phpcredits
        367. phpinfo
        368. phpversion
        369. pi
        370. popen
        371. pos
        372. pow
        373. prev
        374. print
        375. print_r
        376. printf
        377. putenv
        378. quoted_printable_decode
        379. quotemeta
        380. rad2deg
        381. rand
        382. range
        383. rawurldecode
        384. rawurlencode
        385. readdir
        386. readfile
        387. readlink
        388. realpath
        389. register_shutdown_function
        390. register_tick_function
        391. rename
        392. reset
        393. restore_error_handler
        394. restore_exception_handler
        395. restore_include_path
        396. rewind
        397. rewinddir
        398. rmdir
        399. round
        400. rsort
        401. rtrim
        402. serialize
        403. set_error_handler
        404. set_exception_handler
        405. set_file_buffer
        406. set_include_path
        407. set_magic_quotes_runtime
        408. set_time_limit
        409. setcookie
        410. setlocale
        411. setrawcookie
        412. settype
        413. sha1
        414. sha1_file
        415. shell_exec
        416. show_source
        417. shuffle
        418. similar_text
        419. sin
        420. sinh
        421. sizeof
        422. sleep
        423. socket_get_status
        424. socket_set_blocking
        425. socket_set_timeout
        426. sort
        427. soundex
        428. split
        429. spliti
        430. sprintf
        431. sql_regcase
        432. sqrt
        433. srand
        434. sscanf
        435. stat
        436. str_ireplace
        437. str_pad
        438. str_repeat
        439. str_replace
        440. str_rot13
        441. str_shuffle
        442. str_split
        443. str_word_count
        444. strcasecmp
        445. strchr
        446. strcmp
        447. strcoll
        448. strcspn
        449. strftime
        450. stripcslashes
        451. stripslashes
        452. strip_tags
        453. stripos
        454. stristr
        455. strlen
        456. strnatcasecmp
        457. strnatcmp
        458. strncasecmp
        459. strncmp
        460. strpbrk
        461. strpos
        462. strrchr
        463. strrev
        464. strripos
        465. strrpos
        466. strspn
        467. strstr
        468. strtok
        469. strtolower
        470. strtotime
        471. strtoupper
        472. strtr
        473. strval
        474. substr
        475. substr_compare
        476. substr_count
        477. substr_replace
        478. symlink
        479. syslog
        480. system
        481. tan
        482. tanh
        483. tempnam
        484. time
        485. time_nanosleep
        486. tmpfile
        487. touch
        488. trigger_error
        489. trim
        490. uasort
        491. ucfirst
        492. ucwords
        493. uksort
        494. umask
        495. uniqid
        496. unlink
        497. unpack
        498. unregister_tick_function
        499. unserialize
        500. unset
        501. urldecode
        502. urlencode
        503. user_error
        504. usleep
        505. usort
        506. var_dump
        507. var_export
        508. version_compare
        509. vprintf
        510. vsprintf
        511. wordwrap
        512. zend_logo_guid
        513. zend_version
    21. B. Extension Overview
      1. B.1. Optional Extensions Listing
        1. BCMath Arbitrary Precision Mathematics
        2. Calendar
        3. cPDF
        4. COM
        5. ctype
        6. CURL
        7. dBase
        8. DBM-Style Database Abstraction
        9. dbx
        10. DOM XML
        11. EXIF
        12. FrontBase
        13. FDF
        14. File Alteration Monitor
        15. filePro
        16. FTP
        17. Gd/gd2
        18. gettext
        19. GMP
        20. Hyperwave
        21. iconv
        22. IMAP , POP3 , and NNTP
        23. Informix
        24. Ingres II
        25. InterBase
        26. IRC Gateway
        27. Java
        28. LDAP
        29. mcrypt
        30. MCVE
        31. mhash
        32. Microsoft SQL Server
        33. Ming
        34. mnoGoSearch
        35. msession
        36. mSQL
        37. MySQL
        38. ODBC
        39. openssl
        40. Oracle
        41. OvrimosSQL
        42. Verisign Payflow Pro
        43. PostgreSQL
        44. pspell
        45. Readline
        46. Recode
        47. shmop
        48. SNMP
        49. sockets
        50. Sybase
        51. System V Semaphore and Shared Memory
        52. tidy
        53. WDDX
        54. XML Parser
        55. YAZ
        56. YP/NIS
        57. zlib Compression
    22. About the Authors
    23. Colophon
    24. Copyright