This is the code repository for The Art of Modern PHP 8, published by Packt.
Learn how to write modern, performant, and enterprise-ready code with the latest PHP features and practices
PHP has come a long way since its introduction. While the language has evolved with PHP 8, there are still a lot of websites running on a version of PHP that is no longer supported. If you are a PHP developer working with legacy PHP systems and wish to discover the tenants of modern PHP, this book is a perfect solution for you.
This book covers the following exciting features:
- Understand how to use modern PHP features such as objects, types, and more
- Get to grips with PHP package management using Composer
- Explore dependency injection for your PHP applications
- Discover the difference between legacy and modern PHP 8 code and practice
- Write clean PHP code and implement design patterns
- Get hands-on with modern PHP using examples applying MVC and DI techniques
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
<?php
declare(strict_types=1);
namespace Book\Part1\Chapter1;
use Book\Part1\Chapter1\Simple\SimpleClass;
require __DIR__ . '/../../../vendor/autoload.php';
$instance = new SimpleClass();
echo "\n" . $instance->name; // Simon
$instance2 = new SimpleClass('Sally');
echo "\n" . $instance2->name; //Sally
Following is what you need for this book: The book is for existing PHP developers and CTO-level professionals who are working with PHP technologies, including legacy PHP, in production. The book assumes beginner-level knowledge of PHP programming as well as experience with server-side development.
With the following software and hardware list you can run all code files present in the book (Chapter 1-12).
Chapter | Software required | OS required |
---|---|---|
1-11 | php 8.0 | Windows, Mac OS X, and Linux (Any) |
12 | php 8.1 | Windows, Mac OS X, and Linux (Any) |
-
PHP 8 Programming Tips, Tricks and Best Practices [Packt] [Amazon]
-
Drupal 9 Module Development - Third Edition [Packt] [Amazon]
Joseph Edmonds is a business owner, developer, and author. He is a Zend Certified Engineer, among his other credentials. He's been a part of the e-commerce, tech, and PHP development worlds since the dawn of the millennium. He witnessed the exploding growth of e-commerce from the early days, helping several companies advance and expand their operations. During this time, he has had the pleasure of seeing PHP grow from a fairly amateur language, punching way above its weight, into a modern and highly performant language for serious enterprise projects. Responding to a growing demand for highly specialized PHP development services, he launched Edmonds Commerce in 2007. As an independent agency, Edmonds Commerce provides highly specialist PHP development services to businesses that use open source PHP, and predominantly Magento, as the backbone of their online systems, solving even the most complex and unique PHP development challenges. As a way to offer a high-level, interrelated service to businesses who want to accelerate their growth, he started an exciting new venture in 2020. LTS (Long Term Support Ltd.) provides expert help in recruitment, training, DevOps and infrastructure, consultancy, and development.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.