Book description
Use new features of PHP 7 to solve practical, real-world problems faced by PHP developers like yourself every day.
About This BookThis course covers the new features of version 7.x, best practices for server-side programming, and MVC frameworks
Leverage the potential of PHP for server-side programming, memory management, and Object-Oriented Programming to improve your programming productivity
This course also illustrates the development of a complete modular application using PHP 7 in detail
If you are an aspiring web developer, mobile developer, or back-end programmer, who has basic experience in PHP programming and wants to develop performance-critical applications, then this course is for you. It will take your PHP programming skills to next level.
What You Will LearnSolve 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
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:
PHP 7 Programming Cookbook, Doug Bierer
Learning PHP 7 High Performance, Altaf Hussain
Modular Programming with PHP 7, Branko Ajzele
This book takes a practical, step-by-step approach with real-world examples that serve as building blocks for your application development and guide you through improving the quality of your code.
Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.
Table of contents
-
PHP 7: Real World Application Development
- Table of Contents
- PHP 7: Real World Application Development
- PHP 7: Real World Application Development
- Credits
- Preface
-
1. Module 1
- 1. Building a Foundation
- 2. Using PHP 7 High Performance Features
- 3. Working with PHP Functions
- 4. Working with PHP Object-Oriented Programming
- 5. Interacting with a Database
- 6. Building Scalable Websites
- 7. Accessing Web Services
-
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
- 9. Developing Middleware
- 10. Looking at Advanced Algorithms
- 11. Implementing Software Design Patterns
- 12. Improving Web Security
- 13. Best Practices, Testing, and Debugging
- A. Defining PSR-7 Classes
-
2. Module 2
- 1. Setting Up the Environment
- 2. New Features in PHP 7
- 3. Improving PHP 7 Application Performance
- 4. Improving Database Performance
- 5. Debugging and Profiling
- 6. Stress/Load Testing PHP Applications
- 7. Best Practices in PHP Programming
- A. Tools to Make Life Easy
- B. MVC and Frameworks
-
3. Module 3
-
1. Ecosystem Overview
-
Getting ready for PHP 7
- Scalar type hints
- Return type hints
- Anonymous classes
- The Closure::call() method
- Generator delegation
- Generator return expressions
- The null coalesce operator
- The Spaceship operator
- Throwables
- The \ParseError
- Level support for the dirname() function
- The integer division function
- Constant arrays
- Uniform variable syntax
- Secure random number generator
- Filtered unserialize()
- Context sensitive lexer
- Group use declarations
- Unicode enhancements
- Assertions
- Changes to the list() construct
- Session options
- Deprecated features
- Frameworks
- Summary
-
Getting ready for PHP 7
- 2. GoF Design Patterns
- 3. SOLID Design Principles
- 4. Requirement Specification for a Modular Web Shop App
- 5. Symfony at a Glance
- 6. Building the Core Module
- 7. Building the Catalog Module
- 8. Building the Customer Module
- 9. Building the Payment Module
- 10. Building the Shipment Module
-
11. Building the Sales Module
- Requirements
- Dependencies
-
Implementation
- Creating a Cart entity
- Creating the cart item entity
- Creating an Order entity
- Creating a SalesOrderItem entity
- Overriding the add_to_cart_url service
- Overriding the checkout_menu service
- Overriding the customer orders service
- Overriding the bestsellers service
- Creating the Cart page
- Creating the Payment service
- Creating the Shipment service
- Creating the Checkout page
- Creating the order success page
- Creating a store manager dashboard
- Unit testing
- Functional testing
- Summary
- 12. Integrating and Distributing Modules
-
1. Ecosystem Overview
- Bibliography
- Index
Product information
- Title: PHP 7: Real World Application Development
- Author(s):
- Release date: September 2016
- Publisher(s): Packt Publishing
- ISBN: 9781787129009
You might also like
book
Pro PHP Programming
If you are a web programmer, you need to know modern PHP. This book presents with …
book
PHP Object-Oriented Solutions
With the surge of popularity of PHP 5, object-oriented programming is now an important consideration for …
book
Learning PHP 7
Learn the art of PHP programming through this example-rich book filled to the brim with tutorials …
book
Mastering PHP 7
Effective, readable, and robust codes in PHP Key Features [*] Leverage the newest tools available in …