You are previewing PHP Advanced and Object-Oriented Programming: Visual Quickpro Guide, Third Edition.
O'Reilly logo
PHP Advanced and Object-Oriented Programming: Visual Quickpro Guide, Third Edition

Book Description

Readers can take their PHP skills to the next level with this fully revised and updated PHP Advanced: Visual QuickPro Guide, Third Edition! Filled with fourteen chapters of step-by-step content and written by bestselling author and PHP programmer Larry Ullman, this guide teaches specific topics in direct, focused segments, shows how PHP is used in real-world applications. The book teaches developing web applications using advanced PHP techniques and advanced database concepts, and this edition offers several chapters devoted to object-oriented programming and all-new chapters on debugging, testing, and performance and using the Zend framework. Author hosts a popular companion website at www.larryullman.com, where readers can freely download code used in the book, access a user forum and book updates, and get advice directly from the author.

Table of Contents

  1. Title Page
  2. Copyright Page
  3. Dedication
  4. My utmost thanks to...
  5. Table of Contents
  6. Introduction
    1. About This Book
    2. What You’ll Need
    3. Support Web Site
  7. 1. Advanced PHP Techniques
    1. Multidimensional Arrays
    2. Advanced Function Definitions
    3. The Heredoc Syntax
    4. Using printf() and sprintf()
    5. Review and Pursue
  8. 2. Developing Web Applications
    1. Modularizing a Web Site
    2. Improved SEO with mod_rewrite
    3. Affecting the Browser Cache
    4. Review and Pursue
  9. 3. Advanced Database Concepts
    1. Storing Sessions in a Database
    2. Working with U.S. Zip Codes
    3. Creating Stored Functions
    4. Displaying Results Horizontally
    5. Review and Pursue
  10. 4. Basic Object-Oriented Programming
    1. OOP Theory
    2. Defining a Class
    3. Creating an Object
    4. The $this Attribute
    5. Creating Constructors
    6. Creating Destructors
    7. Designing Classes with UML
    8. Better Documentation with phpDocumentor
    9. Review and Pursue
  11. 5. Advanced OOP
    1. Advanced Theories
    2. Inheriting Classes
    3. Inheriting Constructors and Destructors
    4. Overriding Methods
    5. Access Control
    6. Using the Scope Resolution Operator
    7. Creating Static Members
    8. Review and Pursue
  12. 6. More Advanced OOP
    1. Abstract Classes and Methods
    2. Interfaces
    3. Traits
    4. Type Hinting
    5. Namespaces
    6. Review and Pursue
  13. 7. Design Patterns
    1. Understanding Design Patterns
    2. The Singleton Pattern
    3. The Factory Pattern
    4. The Composite Pattern
    5. The Strategy Pattern
    6. Review and Pursue
  14. 8. Using Existing Classes
    1. Catching Exceptions
    2. Extending the Exception Class
    3. Using PDO
    4. Using the Standard PHP Library
    5. Review and Pursue
  15. 9. Example—CMS with OOP
    1. Identifying the Goals
    2. Creating the Database
    3. Making the Template
    4. Writing a Utilities File
    5. Creating the Error View File
    6. Defining the Classes
    7. Creating the Home Page
    8. Viewing a Page
    9. Using HTML_QuickForm2
    10. Logging Out
    11. Adding Pages
    12. Review and Pursue
  16. 10. Networking with PHP
    1. Accessing Other Web Sites
    2. Working with Sockets
    3. Performing IP Geolocation
    4. Using cURL
    5. Creating Web Services
    6. Review and Pursue
  17. 11. PHP and the Server
    1. Compressing Files
    2. Establishing a cron
    3. Using MCrypt
    4. Review and Pursue
  18. 12. PHP’s Command-Line Interface
    1. Testing Your Installation
    2. Executing Bits of Code
    3. Interactive PHP CLI
    4. Creating a Command-Line Script
    5. Running a Command-Line Script
    6. Working with Command-Line Arguments
    7. Taking Input
    8. Built-In Server
    9. Review and Pursue
  19. 13. XML and PHP
    1. What Is XML?
    2. XML Syntax
    3. Attributes, Empty Elements, and Entities
    4. Defining XML Schemas
    5. Parsing XML
    6. Creating an RSS Feed
    7. Review and Pursue
  20. 14. Debugging, Testing, and Performance
    1. Debugging Tools
    2. Unit Testing
    3. Profiling Scripts
    4. Improving Performance
    5. Review and Pursue
  21. Index
  22. Add Page