You are previewing Pro PHP Programming.
O'Reilly logo
Pro PHP Programming

Book Description

If you are a web programmer, you need to know modern PHP. This book presents with many new areas in which PHP plays a large role. If you want to write a mobile application using geo-location data, Pro PHP Programming will show you how. Additionally, if you need to make sure that you can write a multilingual indexing application using Sphinx, this book will help you avoid the pitfalls.

Of course, Pro PHP Programming gives a thorough survey of PHP post-5.3. You'll begin by working through an informative survey and clear guide to object-oriented PHP. Then, you'll be set for the core of the book on modern PHP applications. Now, you'll be able to start with the chapter on PHP for mobile programming and move on to sampling social media applications. You'll also be guided through new PHP programming language features like closures and namespaces.

Pro PHP Programming deals with filtering data from users and databases next, so you'll be well prepared for relational and NoSQL databases. Of course, you can also learn about data retrieval from other sources, like OCR libraries or websites. Then the question of how to format and present data arises, and in Pro PHP Programming, you'll find solutions via JSON, AJAX and XML.

What you'll learn

  • PHP 5.3 object-oriented programming and new PHP features

  • Writing programs talking to SQL-based and NoSQL-based databases alike

  • Using modern PHP programmer's tools

  • Writing social media applications

  • Investigating NoSQL datastores

  • Writing PHP programs for a cloud ecology

Who this book is for

This book is for intermediate and advanced PHP programmers, as well as programmers coming from other languages such as Python, Perl, C/C++. It can also be utilized by programmers with knowledge of a previous PHP version who want to return to PHP.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Authors
  6. About the Technical Reviewer
  7. Foreword
  8. Acknowledgments
  9. Introducing PHP
    1. Origins of PHP
    2. What Is PHP?
    3. High- Level Overview of This Book
    4. The Future of PHP
  10. Chapter 1: Object Orientation
    1. Classes
    2. Inheritance and Overloading
    3. Miscellaneous “Magic” Methods
    4. Copying, Cloning, and Comparing Objects
    5. Interfaces, Iterators, and Abstract Classes
    6. Class Scope and Static Members
    7. Summary
  11. Chapter 2: Exceptions and References
    1. Exceptions
    2. References
    3. Summary
  12. Chapter 3: Mobile PHP
    1. Mobile Variance
    2. Detecting Devices
    3. Detecting Mobile Capabilities
    4. Rendering Tools
    5. Emulators and SDKs
    6. QR Codes
    7. Summary
  13. Chapter 4: Social Media
    1. OAuth
    2. Twitter
    3. Facebook
    4. Summary
  14. Chapter 5: Cutting Edge
    1. Namespaces
    2. Anonymous Functions (Closures)
    3. Nowdoc
    4. Local goto Statements
    5. Standard PHP Library
    6. Phar Extension
    7. Summary
  15. Chapter 6: Form Design and Management
    1. Data Validation
    2. Uploading Files / Images
    3. Image Conversion and Thumbnails
    4. Regular Expressions
    5. Multi-Language Integration
    6. Summary
  16. Chapter 7: Database Integration I
    1. Introduction to MongoDB
    2. Introduction to CouchDB
    3. Introduction to SQLite
    4. Summary
  17. Chapter 8: Database Integration II
    1. Introduction to MySQLi Extension
    2. Introduction to PDO
    3. Introduction to ADOdb
    4. Full-Text Searches with Sphinx
    5. Summary
  18. Chapter 9: Database Integration III
    1. Introduction to Oracle RDBMS
    2. The Basics: Connecting and Executing SQL
    3. Array Interface
    4. PL/SQL Procedures and Cursors
    5. Working with LOB types
    6. Connecting to DB Revisited: Connection Pooling
    7. Character Sets in the Database and PHP
    8. Summary
  19. Chapter 10: Libraries
    1. SimplePie
    2. TCPDF
    3. Google Map Integration
    4. E-mail and SMS
    5. gChartPHP: a Google Chart API Wrapper
    6. Summary
  20. Chapter 11: Security
    1. Never Trust Data
    2. Common Attacks
    3. Sessions
    4. Preventing SQL Injection
    5. The Filter Extension
    6. php.ini and Server Settings
    7. Password Algorithms
    8. Summary
  21. Chapter 12: Agile Development with Zend Studio for Eclipse, Bugzilla, Mylyn, and Subversion
    1. Principles of Agile Development
    2. The Agile Development Rally
    3. Introduction to Bugzilla
    4. Mylyn for Eclipse
    5. Bugzilla and Mylyn Combined Within Eclipse
    6. Extrapolating the Benefits
    7. Summary
  22. Chapter 13: Refactoring, Unit Testing, and Continuous Integration
    1. Refactoring
    2. Unit Testing
    3. Continuous Integration
    4. Summary
  23. Chapter 14: XML
    1. XML Primer
    2. Schemas
    3. SimpleXML
    4. DOMDocument
    5. XMLReader and XMLWriter
    6. Summary
  24. Chapter 15: JSON and Ajax
    1. JSON
    2. Ajax
    3. A Simple Graphic Program
    4. Summary
  25. Chapter 16: Conclusion
    1. Resources
    2. Conferences
    3. PHP Certification
    4. Summary
  26. Appendix: Regular Expressions
    1. Regular Expression Syntax
    2. Regular Expression Examples
    3. PHP Regular Expression Functions
  27. Index