You are previewing PHP 5 Power Programming.
O'Reilly logo
PHP 5 Power Programming

Book Description

"This book, written by my colleague, Andi Gutmans, and two very prominent PHP developers, Stig Bakken and Derick Rethans, holds the key to unlocking the riches of PHP 5. It thoroughly covers all of the features of this new version, and is a must have for all PHP developers interested in exploring PHP 5's advanced features"

—Zeev Suraski, Co-Designer of PHP 5 and Co-Creator of the Zend Engine

  • Expert PHP 5 programming techniques, direct from PHP 5 co-creator and key developers

  • Definitive coverage of the PHP object model, design patterns, XML/SOAP integration, and more

  • Solid introduction and expert insights into performance tuning, PEAR, extensions, and database access

  • The definitive introduction to PHP 5's advanced features!

  • The definitive introduction for today's most powerful PHP 5 techniques

  • In this book, PHP 5's co-creator and two leading PHP developers show you how to make the most of PHP 5's industrial-strength enhancements in any project—no matter how large or complex. Their unique insights and realistic examples illuminate PHP 5's new object model, powerful design patterns, improved XML Web services support, and much more. Whether you're creating web applications, extensions, packages, or shell scripts—or migrating PHP 4 code—here are high-powered solutions you won't find anywhere else.

    Review PHP's syntax and master its object-oriented capabilities—from properties and methods to polymorphism, interfaces, and reflection

  • Master the four most important design patterns for PHP development

  • Write powerful web applications: handle input, cookies, session extension, and more

  • Integrate with MySQL, SQLite, and other database engines

  • Provide efficient error handling that's transparent to your users

  • Leverage PHP 5's improved XML support—including parsing, XSLT conversions, and more

  • Build XML-based web services with XML-RPC and SOAP

  • Make the most of PEAR: work with the repository, use key packages, and create your own

  • Upgrade PHP 4 code to PHP 5—compatibility issues, techniques, and practical workarounds

  • Improve script performance: tips and tools for PHP optimization

  • Use PHP extensions to handle files/streams, regular expressions, dates/times, and graphics

  • Create original extensions and shell scripts

  • If you're a software developer new to PHP, you'll leap quickly into PHP and its new object-oriented capabilities. If you're an experienced PHP programmer, you already recognize PHP's convenience and simplicity. Now, discover all of its extraordinary power!

    ABOUT THE SOFTWARE

    At this book's link to Zend.com, download a fully functional 90-day version of Zend Studio, today's breakthrough tool for developing, managing, and debugging PHP code.

    Series Editor Bruce Perens' is an open source evangelist, developer, and consultant whose software is a major component of most commercial embedded Linux offerings. He founded or cofounded Linux Standard Base, Open Source Initiative, and Software in the Public Interest. As Debian GNU/Linux Project Leader, he was instrumental in getting the system on two U.S. space shuttle flights.

    © Copyright Pearson Education. All rights reserved.

    Table of Contents

    1. Copyright
    2. Bruce Peren's Open Source Series
    3. About Prentice Hall Professional Technical Reference
    4. Foreword
    5. Preface
    6. What Is New in PHP 5?
      1. Introduction
      2. Language Features
      3. General PHP Changes
      4. Other New Features in PHP 5
      5. Summary
    7. PHP 5 Basic Language
      1. Introduction
      2. HTML Embedding
      3. Comments
      4. Variables
      5. Basic Data Types
      6. Operators
      7. Control Structures
      8. Functions
      9. Summary
    8. PHP 5 OO Language
      1. Introduction
      2. Objects
      3. Declaring a Class
      4. The new Keyword and Constructors
      5. Destructors
      6. Accessing Methods and Properties Using the $this Variable
      7. Class Constants
      8. Cloning Objects
      9. Polymorphism
      10. parent:: and self::
      11. instanceof Operator
      12. Abstract Methods and Classes
      13. Interfaces
      14. Inheritance of Interfaces
      15. final Methods
      16. final Classes
      17. __toString() Method
      18. Exception Handling
      19. __autoload()
      20. Class Type Hints in Function Parameters
      21. Summary
    9. PHP 5 Advanced OOP and Design Patterns
      1. Introduction
      2. Overloading Capabilities
      3. Iterators
      4. Design Patterns
      5. Reflection
      6. Summary
    10. How to Write a Web Application with PHP
      1. Introduction
      2. Embedding into HTML
      3. User Input
      4. Safe-Handling User Input
      5. Techniques to Make Scripts “Safe”
      6. Cookies
      7. Sessions
      8. File Uploads
      9. Architecture
      10. Summary
    11. Databases with PHP 5
      1. Introduction
      2. MySQL
      3. SQLite
      4. PEAR DB
      5. Summary
    12. Error Handling
      1. Introduction
      2. Types of Errors
      3. PEAR Errors
      4. Exceptions
      5. Summary
    13. XML with PHP 5
      1. Introduction
      2. Vocabulary
      3. Parsing XML
      4. SimpleXML
      5. PEAR
      6. Converting XML
      7. Communicating with XML
      8. Summary
    14. Mainstream Extensions
      1. Introduction
      2. Files and Streams
      3. Regular Expressions
      4. Date Handling
      5. Graphics Manipulation with GD
      6. Multi-Byte Strings and Character Sets
      7. Summary
    15. Using PEAR
      1. Introduction
      2. PEAR Concepts
      3. Obtaining PEAR
      4. Installing Packages
      5. Configuration Parameters
      6. PEAR Commands
      7. Installer Front-Ends
      8. Summary
    16. Important PEAR Packages
      1. Introduction
      2. Database Queries
      3. Template Systems
      4. Authentication
      5. Form Handling
      6. Caching
      7. Summary
    17. Building PEAR Components
      1. Introduction
      2. PEAR Standards
      3. Release Versioning
      4. CLI Environment
      5. Fundamentals
      6. Building Packages
      7. The package.xml Format
      8. Dependencies
      9. String Substitutions
      10. Including C Code
      11. Releasing Packages
      12. The PEAR Release Process
      13. Packaging
      14. Uploading
      15. Summary
    18. Making the Move
      1. Introduction
      2. The Object Model
      3. Passing Objects to Functions
      4. Compatibility Mode
      5. Other Changes
      6. E_STRICT
      7. Other Compatibility Problems
      8. Changes in Functions
      9. Summary
    19. Performance
      1. Introduction
      2. Design for Performance
      3. Benchmarking
      4. Profiling with Zend Studio's Profiler
      5. Profiling with APD
      6. Profiling with Xdebug
      7. Using APC (Advanced PHP Cache)
      8. Using ZPS (Zend Performance Suite)
      9. Optimizing Code
      10. Summary
    20. An Introduction to Writing PHP Extensions
      1. Introduction
      2. Quickstart
      3. Summary
    21. PHP Shell Scripting
      1. Introduction
      2. PHP CLI Shell Scripts
      3. Summary
    22. PEAR and PECL Package Index
      1. Authentication
      2. Benchmarking
      3. Caching
      4. Configuration
      5. Console
      6. Database
      7. Date and Time
      8. Encryption
      9. File Formats
      10. File System
      11. Gtk Components
      12. HTML
      13. HTTP
      14. Images
      15. Internationalization
      16. Logging
      17. Mail
      18. Math
      19. Networking
      20. Numbers
      21. Payment
      22. PEAR
      23. PHP
      24. Processing
      25. Science
      26. Streams
      27. Structures
      28. System
      29. Text
      30. Tools and Utilities
      31. Web Services
      32. XML
    23. phpDocumentor Format Reference
      1. Introduction
      2. Documentation Comments
      3. Tag Reference
      4. Tag Table
      5. Using the phpDocumentor Tool
    24. Zend Studio Quick Start Guide
      1. Version 3.5.x
      2. About the Zend Studio Client Quick Start Guide
      3. About Zend
      4. Zend Studio Client: Overview
      5. Editing a File
      6. Working with Projects
      7. Running the Debugger
      8. Configure Studio Server for Remote Debugger and Profiling
      9. Running the Profiler
      10. Product Support
      11. Main Features
    25. Index