PHP 7: Real World Application Development

Use new features of PHP 7 to solve practical, real-world problems faced by PHP developers like yourself every day
Preview in Mapt

PHP 7: Real World Application Development

Doug Bierer, Altaf Hussain, Branko Ajzele

4 customer reviews
Use new features of PHP 7 to solve practical, real-world problems faced by PHP developers like yourself every day
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $69.99
Save 85%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$29.99 p/m after trial
RRP $69.99
Subscription
eBook
Start 30 Day Trial

Frequently bought together


PHP 7: Real World Application Development Book Cover
PHP 7: Real World Application Development
$ 69.99
$ 10.00
Unity 2017 Game Development Essentials - Third Edition Book Cover
Unity 2017 Game Development Essentials - Third Edition
$ 39.99
$ 10.00
Buy 2 for $20.00
Save $89.98
Add to Cart

Book Details

ISBN 139781787129009
Paperback1091 pages

Book Description

PHP is a great language for developing web applications. It is essentially a server-side scripting language. PHP 7 is the latest version, providing major backward-compatibility breaks and focusing on improved performance and speed.

This course follows a learning path which is divided into three modules. Each module is a mini course in its own right, taking your basic PHP programing skills to the next level by showing you intermediate to advanced PHP techniques with a focus on PHP 7. This way, get you equipped with the tools and skills required to develop professional and efficient applications for your websites and enterprises.

The first module of the book is a programming cookbook that consists over 80 recipes! Each recipe is designed to solve practical, real-world problems faced by PHP developers like yourself every day. This course also covers new ways of writing PHP code made possible only in version 7.

The second module of the course is designed to improve the performance and productivity of your application. We’ll introduce you to the concepts of Object-Oriented Programming (OOP) in PHP 7, then shed some light on how to improve the performance of your PHP 7 applications and database. Throughout this module you will be introduced to benchmarking tools.

With all important concepts of PHP covered up you will move on to third module. In this module you will gain a deep insight into the modular programming paradigm and how to achieve modularity in your PHP code. Modular design techniques help you build readable, manageable, reusable, and more efficient codes. PHP 7, which is a popular open source scripting language, is used to build modular functions for your software.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

Table of Contents

Chapter 1: Building a Foundation
Introduction
PHP 7 installation considerations
Using the built-in PHP web server
Defining a test MySQL database
Installing PHPUnit
Implementing class autoloading
Hoovering a website
Building a deep web scanner
Creating a PHP 5 to PHP 7 code converter
Chapter 2: Using PHP 7 High Performance Features
Introduction
Understanding the abstract syntax tree
Understanding differences in parsing
Understanding differences in foreach() handling
Improving performance using PHP 7 enhancements
Iterating through a massive file
Uploading a spreadsheet into a database
Recursive directory iterator
Chapter 3: Working with PHP Functions
Introduction
Developing functions
Hinting at data types
Using return value data typing
Using iterators
Writing your own iterator using generators
Chapter 4: Working with PHP Object-Oriented Programming
Introduction
Developing classes
Extending classes
Using static properties and methods
Using namespaces
Defining visibility
Using interfaces
Using traits
Implementing anonymous classes
Chapter 5: Interacting with a Database
Introduction
Using PDO to connect to a database
Building an OOP SQL query builder
Handling pagination
Defining entities to match database tables
Tying entity classes to RDBMS queries
Embedding secondary lookups into query results
Implementing jQuery DataTables PHP lookups
Chapter 6: Building Scalable Websites
Introduction
Creating a generic form element generator
Creating an HTML radio element generator
Creating an HTML select element generator
Implementing a form factory
Chaining $_POST filters
Chaining $_POST validators
Tying validation to a form
Chapter 7: Accessing Web Services
Introduction
Converting between PHP and XML
Creating a simple REST client
Creating a simple REST server
Creating a simple SOAP client
Creating a simple SOAP server
Chapter 8: Working with Date/Time and International Aspects
Introduction
Using emoticons or emoji in a view script
Converting complex characters
Getting the locale from browser data
Formatting numbers by locale
Handling currency by locale
Formatting date/time by locale
Creating an HTML international calendar generator
Building a recurring events generator
Handling translation without gettext
Chapter 9: Developing Middleware
Introduction
Authenticating with middleware
Using middleware to implement access control
Improving performance using the cache
Implementing routing
Making inter-framework system calls
Using middleware to cross languages
Chapter 10: Looking at Advanced Algorithms
Introduction
Using getters and setters
Implementing a linked list
Building a bubble sort
Implementing a stack
Building a binary search class
Implementing a search engine
Displaying a multi-dimensional array and accumulating totals
Chapter 11: Implementing Software Design Patterns
Introduction
Creating an array to object hydrator
Building an object to array hydrator
Implementing a strategy pattern
Defining a mapper
Implementing object-relational mapping
Implementing the Pub/Sub design pattern
Chapter 12: Improving Web Security
Introduction
Filtering $_POST data
Validating $_POST data
Safeguarding the PHP session
Securing forms with a token
Building a secure password generator
Safeguarding forms with a CAPTCHA
Encrypting/decrypting without mcrypt
Chapter 13: Best Practices, Testing, and Debugging
Introduction
Using Traits and Interfaces
Universal exception handler
Universal error handler
Writing a simple test
Writing a test suite
Generating fake test data
Customizing sessions using session_start parameters
Chapter 14: Setting Up the Environment
Setting up Windows
Setting up Debian or Ubuntu
Setting up CentOS
Setting up Vagrant
Summary
Chapter 15: New Features in PHP 7
OOP features
New operators
Uniform variable syntax
Miscellaneous features and changes
Summary
Chapter 16: Improving PHP 7 Application Performance
NGINX and Apache
HTTP server optimization
HTTP persistent connection
Content Delivery Network (CDN)
CSS and JavaScript optimization
Full page caching
Varnish
The infrastructure
Summary
Chapter 17: Improving Database Performance
The MySQL database
Storage engines
The Percona Server - a fork of MySQL
MySQL performance monitoring tools
Percona XtraDB Cluster (PXC)
Redis – the key-value cache store
Memcached key-value cache store
Summary
Chapter 18: Debugging and Profiling
Xdebug
Profiling with Xdebug
PHP DebugBar
Summary
Chapter 19: Stress/Load Testing PHP Applications
Apache JMeter
ApacheBench (ab)
Siege
Load testing real-world applications
Summary
Chapter 20: Best Practices in PHP Programming
Coding styles
Test-driven development (TDD)
Design patterns
Service-oriented architecture (SOA)
Being object-oriented and reusable always
PHP frameworks
Version control system (VCS) and Git
Deployment and Continuous Integration (CI)
Summary
Chapter 21: Ecosystem Overview
Getting ready for PHP 7
Summary
Chapter 22: GoF Design Patterns
Creational patterns
Structural patterns
Behavioral patterns
Summary
Chapter 23: SOLID Design Principles
Single responsibility principle
Open/closed principle
Liskov substitution principle
Interface Segregation Principle
Dependency inversion principle
Summary
Chapter 24: Requirement Specification for a Modular Web Shop App
Defining application requirements
Wireframing
Defining a technology stack
Summary
Chapter 25: Symfony at a Glance
Installing Symfony
Creating a blank project
Using Symfony console
Controller
Routing
Templates
Forms
Configuring Symfony
The bundle system
Databases and Doctrine
Testing
Validation
Summary
Chapter 26: Building the Core Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 27: Building the Catalog Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 28: Building the Customer Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 29: Building the Payment Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 30: Building the Shipment Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 31: Building the Sales Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 32: Integrating and Distributing Modules
Understanding Git
Understanding GitHub
Understanding Composer
Understanding Packagist
Summary

What You Will Learn

  • Solve practical real-world programming problems using PHP 7
  • Discover where and when PHP 5 code needs to be re-written to avoid backwards-compatibility breaks
  • Use advanced PHP 7 features such as the Abstract Syntax Tree, Uniform Variable Syntax, Scalar Type Hints, Generator Delegation, Anonymous Classes, and the Context Sensitive Lexer
  • Set up a high performance development and production environment for PHP 7
  • Discover new OOP features in PHP 7 to achieve high performance
  • Discover the new features of PHP 7 that are relevant to modular application development
  • Explore the ins and outs of the Symfony framework
  • Build a set of modules based on the Symfony framework that comprise a simple web shop app

Authors

Table of Contents

Chapter 1: Building a Foundation
Introduction
PHP 7 installation considerations
Using the built-in PHP web server
Defining a test MySQL database
Installing PHPUnit
Implementing class autoloading
Hoovering a website
Building a deep web scanner
Creating a PHP 5 to PHP 7 code converter
Chapter 2: Using PHP 7 High Performance Features
Introduction
Understanding the abstract syntax tree
Understanding differences in parsing
Understanding differences in foreach() handling
Improving performance using PHP 7 enhancements
Iterating through a massive file
Uploading a spreadsheet into a database
Recursive directory iterator
Chapter 3: Working with PHP Functions
Introduction
Developing functions
Hinting at data types
Using return value data typing
Using iterators
Writing your own iterator using generators
Chapter 4: Working with PHP Object-Oriented Programming
Introduction
Developing classes
Extending classes
Using static properties and methods
Using namespaces
Defining visibility
Using interfaces
Using traits
Implementing anonymous classes
Chapter 5: Interacting with a Database
Introduction
Using PDO to connect to a database
Building an OOP SQL query builder
Handling pagination
Defining entities to match database tables
Tying entity classes to RDBMS queries
Embedding secondary lookups into query results
Implementing jQuery DataTables PHP lookups
Chapter 6: Building Scalable Websites
Introduction
Creating a generic form element generator
Creating an HTML radio element generator
Creating an HTML select element generator
Implementing a form factory
Chaining $_POST filters
Chaining $_POST validators
Tying validation to a form
Chapter 7: Accessing Web Services
Introduction
Converting between PHP and XML
Creating a simple REST client
Creating a simple REST server
Creating a simple SOAP client
Creating a simple SOAP server
Chapter 8: Working with Date/Time and International Aspects
Introduction
Using emoticons or emoji in a view script
Converting complex characters
Getting the locale from browser data
Formatting numbers by locale
Handling currency by locale
Formatting date/time by locale
Creating an HTML international calendar generator
Building a recurring events generator
Handling translation without gettext
Chapter 9: Developing Middleware
Introduction
Authenticating with middleware
Using middleware to implement access control
Improving performance using the cache
Implementing routing
Making inter-framework system calls
Using middleware to cross languages
Chapter 10: Looking at Advanced Algorithms
Introduction
Using getters and setters
Implementing a linked list
Building a bubble sort
Implementing a stack
Building a binary search class
Implementing a search engine
Displaying a multi-dimensional array and accumulating totals
Chapter 11: Implementing Software Design Patterns
Introduction
Creating an array to object hydrator
Building an object to array hydrator
Implementing a strategy pattern
Defining a mapper
Implementing object-relational mapping
Implementing the Pub/Sub design pattern
Chapter 12: Improving Web Security
Introduction
Filtering $_POST data
Validating $_POST data
Safeguarding the PHP session
Securing forms with a token
Building a secure password generator
Safeguarding forms with a CAPTCHA
Encrypting/decrypting without mcrypt
Chapter 13: Best Practices, Testing, and Debugging
Introduction
Using Traits and Interfaces
Universal exception handler
Universal error handler
Writing a simple test
Writing a test suite
Generating fake test data
Customizing sessions using session_start parameters
Chapter 14: Setting Up the Environment
Setting up Windows
Setting up Debian or Ubuntu
Setting up CentOS
Setting up Vagrant
Summary
Chapter 15: New Features in PHP 7
OOP features
New operators
Uniform variable syntax
Miscellaneous features and changes
Summary
Chapter 16: Improving PHP 7 Application Performance
NGINX and Apache
HTTP server optimization
HTTP persistent connection
Content Delivery Network (CDN)
CSS and JavaScript optimization
Full page caching
Varnish
The infrastructure
Summary
Chapter 17: Improving Database Performance
The MySQL database
Storage engines
The Percona Server - a fork of MySQL
MySQL performance monitoring tools
Percona XtraDB Cluster (PXC)
Redis – the key-value cache store
Memcached key-value cache store
Summary
Chapter 18: Debugging and Profiling
Xdebug
Profiling with Xdebug
PHP DebugBar
Summary
Chapter 19: Stress/Load Testing PHP Applications
Apache JMeter
ApacheBench (ab)
Siege
Load testing real-world applications
Summary
Chapter 20: Best Practices in PHP Programming
Coding styles
Test-driven development (TDD)
Design patterns
Service-oriented architecture (SOA)
Being object-oriented and reusable always
PHP frameworks
Version control system (VCS) and Git
Deployment and Continuous Integration (CI)
Summary
Chapter 21: Ecosystem Overview
Getting ready for PHP 7
Summary
Chapter 22: GoF Design Patterns
Creational patterns
Structural patterns
Behavioral patterns
Summary
Chapter 23: SOLID Design Principles
Single responsibility principle
Open/closed principle
Liskov substitution principle
Interface Segregation Principle
Dependency inversion principle
Summary
Chapter 24: Requirement Specification for a Modular Web Shop App
Defining application requirements
Wireframing
Defining a technology stack
Summary
Chapter 25: Symfony at a Glance
Installing Symfony
Creating a blank project
Using Symfony console
Controller
Routing
Templates
Forms
Configuring Symfony
The bundle system
Databases and Doctrine
Testing
Validation
Summary
Chapter 26: Building the Core Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 27: Building the Catalog Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 28: Building the Customer Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 29: Building the Payment Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 30: Building the Shipment Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 31: Building the Sales Module
Requirements
Dependencies
Implementation
Unit testing
Functional testing
Summary
Chapter 32: Integrating and Distributing Modules
Understanding Git
Understanding GitHub
Understanding Composer
Understanding Packagist
Summary

Book Details

ISBN 139781787129009
Paperback1091 pages
Read More
From 4 reviews

Read More Reviews

Recommended for You

Responsive Web Design with HTML5 and CSS3 - Second Edition Book Cover
Responsive Web Design with HTML5 and CSS3 - Second Edition
$ 31.99
$ 10.00
Object-Oriented Programming with PHP5 Book Cover
Object-Oriented Programming with PHP5
$ 23.99
$ 10.00
Mastering Django: Core Book Cover
Mastering Django: Core
$ 39.99
$ 10.00
TypeScript: Modern JavaScript Development Book Cover
TypeScript: Modern JavaScript Development
$ 69.99
$ 10.00
Mobile Application Development: JavaScript Frameworks Book Cover
Mobile Application Development: JavaScript Frameworks
$ 59.99
$ 10.00
Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 10.00