售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
PHP 7 Programming Cookbook
Table of Contents
PHP 7 Programming Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it...
How it works...
There's more...
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Building a Foundation
Introduction
PHP 7 installation considerations
How to do it...
Installing directly from source
Installing PHP 7 from pre-compiled binaries
Installing a *AMP package
There's more...
See also
Using the built-in PHP web server
How to do it...
Defining a test MySQL database
How to do it...
Installing PHPUnit
Implementing class autoloading
Getting ready
How to do it...
How it works...
Hoovering a website
How to do it...
How it works...
See also
Building a deep web scanner
How to do it...
How it works...
See also
Creating a PHP 5 to PHP 7 code converter
Getting ready
How to do it...
How it works...
See also
2. Using PHP 7 High Performance Features
Introduction
Understanding the abstract syntax tree
How to do it...
How it works...
See also
Understanding differences in parsing
How to do it...
How it works...
See also
Understanding differences in foreach() handling
How to do it...
How it works...
See also
Improving performance using PHP 7 enhancements
How to do it...
How it works...
There's more...
Iterating through a massive file
How to do it...
How it works...
Uploading a spreadsheet into a database
Getting ready...
How to do it...
How it works...
Recursive directory iterator
How to do it...
How it works...
3. Working with PHP Functional Programming
Introduction
Developing functions
How to do it...
How it works...
Hinting at data types
How to do it...
How it works...
See also
Using return value data typing
How to do it...
How it works...
There's more...
See also
Using iterators
How to do it...
How it works...
Writing your own iterator using generators
How to do it...
How it works...
4. Working with PHP Object-Oriented Programming
Introduction
Developing classes
How to do it...
How it works...
See also...
Extending classes
How to do it...
How it works...
Using static properties and methods
How to do it...
How it works...
See also
Using namespaces
How to do it...
How it works...
Defining visibility
How to do it...
How it works...
See also
Using interfaces
How to do it...
How it works...
Using traits
How to do it...
How it works...
Implementing anonymous classes
How to do it...
How it works...
5. Interacting with a Database
Introduction
Using PDO to connect to a database
How to do it...
How it works...
See also
Building an OOP SQL query builder
How to do it...
How it works...
See also
Handling pagination
How to do it...
How it works...
See also
Defining entities to match database tables
How to do it...
How it works...
See also
Tying entity classes to RDBMS queries
How to do it...
How it works...
There's more...
Embedding secondary lookups into query results
How to do it...
How it works...
Implementing jQuery DataTables PHP lookups
How to do it...
How it works...
There's more...
6. Building Scalable Websites
Introduction
Creating a generic form element generator
How to do it...
How it works...
Creating an HTML radio element generator
How to do it...
How it works...
There's more...
Creating an HTML select element generator
How to do it...
How it works...
Implementing a form factory
How to do it...
How it works...
Chaining $_POST filters
How to do it...
How it works...
There's more...
See also
Chaining $_POST validators
How to do it...
How it works...
Tying validation to a form
How to do it...
How it works...
7. Accessing Web Services
Introduction
Converting between PHP and XML
How to do it...
How it works...
Creating a simple REST client
How to do it...
Creating a streams-based REST client
Defining a cURL-based REST client
How it works...
There's more...
See also
Creating a simple REST server
How to do it...
How it works...
There's more...
Creating a simple SOAP client
How to do it...
How it works...
See also
Creating a simple SOAP server
How to do it...
How it works...
See also
8. Working with Date/Time and International Aspects
Introduction
Using emoticons or emoji in a view script
How to do it...
How it works...
See also
Converting complex characters
How to do it...
How it works...
Getting the locale from browser data
How to do it...
How it works...
See also
Formatting numbers by locale
How to do it...
How it works...
See also
Handling currency by locale
How to do it...
How it works...
See also
Formatting date/time by locale
How to do it...
How it works...
See also
Creating an HTML international calendar generator
How to do it...
Refining internationalized output
How it works...
See also
Building a recurring events generator
How to do it...
How it works...
See also
Handling translation without gettext
How to do it...
How it works...
See also
9. Developing Middleware
Introduction
Authenticating with middleware
How to do it...
How it works...
See also
Using middleware to implement access control
How to do it...
How it works...
See also
Improving performance using the cache
How to do it...
How it works...
There's more...
See also
Implementing routing
How to do it...
How it works...
See also
Making inter-framework system calls
How to do it...
How it works...
Using middleware to cross languages
How to do it...
10. Looking at Advanced Algorithms
Introduction
Using getters and setters
How to do it...
How it works...
Implementing a linked list
How to do it...
How it works...
There's more...
Building a bubble sort
How to do it...
How it works...
Implementing a stack
How to do it...
How it works...
Building a binary search class
How to do it...
How it works...
See also
Implementing a search engine
How to do it...
How it works...
Displaying a multi-dimensional array and accumulating totals
How to do it...
How it works...
11. Implementing Software Design Patterns
Introduction
Creating an array to object hydrator
How to do it...
How it works...
Building an object to array hydrator
How to do it...
How it works...
Implementing a strategy pattern
How to do it...
How it works...
Defining a mapper
How to do it...
How it works...
Implementing object-relational mapping
How to do it...
Technique #1 - pre-loading all child information
Technique #2 - embedding secondary lookups
How it works...
See also
Implementing the Pub/Sub design pattern
How to do it...
How it works...
There's more...
See also
12. Improving Web Security
Introduction
Filtering $_POST data
How to do it...
How it works...
See also
Validating $_POST data
How to do it...
How it works...
See also
Safeguarding the PHP session
How to do it...
How it works...
See also
Securing forms with a token
How to do it...
How it works...
See also
Building a secure password generator
How to do it...
How it works...
See also
Safeguarding forms with a CAPTCHA
How to do it...
Generating a text CAPTCHA
Generating an image CAPTCHA
How it works...
There's more...
See also
Encrypting/decrypting without mcrypt
How to do it...
How it works...
There's more...
See also
13. Best Practices, Testing, and Debugging
Introduction
Using Traits and Interfaces
How to do it...
How it works...
Universal exception handler
How to do it...
How it works...
See also
Universal error handler
How to do it...
How it works...
See also
Writing a simple test
How to do it...
Running simple tests
Testing database Model classes
Using mock classes
Using anonymous classes as mock objects
Using Mock Builder
How it works...
Running simple tests
Testing database model classes
Using mock classes
There's more...
See also...
Writing a test suite
How to do it...
How it works...
See also...
Generating fake test data
How to do it...
How it works...
There's more...
Customizing sessions using session_start parameters
How to do it...
How it works...
See also...
A. Defining PSR-7 Classes
Introduction
Implementing PSR-7 value object classes
Getting ready
How to do it...
How it works...
See also
Developing a PSR-7 Request class
How to do it...
How it works...
See also
Defining a PSR-7 Response class
How to do it...
How it works...
See also
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜