This is the code repository for The Art of Modern PHP 8, published by Packt.

Overview

The Art of Modern PHP 8

The Art of Modern PHP 8

This is the code repository for The Art of Modern PHP 8, published by Packt.

Your practical and essential guide to getting up to date with PHP 8

What is this book about?

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!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

name; // Simon $instance2 = new SimpleClass('Sally'); echo "\n" . $instance2->name; //Sally ">
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).

Software and Hardware List

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)

Related products

Get to Know the Author

Joseph Edmonds has over 15 years of experience working with PHP and building websites for eCommerce using PHP. He is the Director of Long Term Support LTD and Zend Certified Engineer

You might also like...
A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface

A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface.

Couleur is a modern PHP 8.1+ color library, intended to be compatible with CSS Color Module Level 4.

🎨 Couleur: A modern PHP 8.1+ color library 🎨 Couleur: A modern PHP 8.1+ color library 👋 Presentation ⚙️ Installation 🏁 Quick Start 📚 Usage 🏭 Imm

Result of our code-along meetup writing PHP 8.1 code

PHP 8.1 Demo Code This code demonstrates various PHP 8.0 and 8.1 features in a realistic, functional (but incomplete) codebase. The code is part of so

Dead Code Detector (DCD) for PHP code.

This project is no longer maintained and its repository is only kept for archival purposes. PHP Dead Code Detector (PHPDCD) phpdcd is a Dead Code Dete

The game is implemented as an example of scalable and high load architecture combined with modern software development practices
The game is implemented as an example of scalable and high load architecture combined with modern software development practices

Crossword game The game is implemented as an example of scalable and high load architecture combined with modern software development practices Exampl

Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting
Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting

Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting

⚗️ Adds code analysis to Laravel improving developer productivity and code quality.
⚗️ Adds code analysis to Laravel improving developer productivity and code quality.

⚗️ About Larastan Larastan was created by Can Vural and Nuno Maduro, got artwork designed by @Caneco, is maintained by Can Vural, Nuno Maduro, and Vik

Free ZIP Code API - Free Access to Worldwide Postal Code Data

About Zipcodebase - Free Zip Code API Zipcodebase is a zip code API that was founded in 2019 to solve common issues with postal code data. As we have

Preload your sweet sweet code to opcache with a composer command, making your code faster to run.

Composer Preload Preload your sweet sweet code to opcache with a composer command, making your code run faster. Composer Preload is a composer plugin

Comments
  • Autoload.php appears to be a third-party dependency...

    Autoload.php appears to be a third-party dependency...

    Some code examples have the following line:

    require __DIR__ . '/../../../vendor/autoload.php';

    This appears to be a third-party dependency outside of the codebase. To get the code examples to work properly, require statements are required (pun intended) to import subdirectory files.

    For the next edition of the book, please replace this dependency with the appropriate require statements or provide a code example of autoload.php early in the book.

    opened by cdreimer-thewriter 0
Owner
Packt
Providing books, eBooks, video tutorials, and articles for IT developers, administrators, and users.
Packt
Allows the date format for "created", "modified" and "published" columns to be set within a Lister.

Lister Native Date Format Allows the date format for "created", "modified" and "published" columns to be set within a Lister or Lister Pro instance. W

Robin Sallis 1 Jan 13, 2022
the repository uses some of the code from php-meminfo to simplify integration

the repository uses some of the code from php-meminfo to simplify integration

Dmitriy Bulgar 1 Nov 18, 2021
This plugin allows you to display code from a repository, such as Github, Gitlab or others in order to use it as a resource in the courses.

Fetch Code This plugin allows you to display code from a repository, such as Github, Gitlab or others in order to use it as a resource in the courses.

Cambá Laboratorio de Tecnología 0 Dec 26, 2021
This repository contains the code for the front end/UI of the login system

Bug-free-login This repository contains the code for the front end/UI of the login system Requirements PHP 5.5.0 or higher. How to use Download ZIP wi

Abhijeet Kumar 2 Oct 6, 2022
PPM is a process manager, supercharger and load balancer for modern PHP applications.

PPM - PHP Process Manager PHP-PM is a process manager, supercharger and load balancer for PHP applications. It's based on ReactPHP and works best with

PPM - PHP Process Manager 6.5k Jan 3, 2023
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Minibase 16 Jun 7, 2022
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Minibase 16 Jun 7, 2022
Cheatsheet for some Php knowledge you will frequently encounter in modern projects.

Cheatsheet for some Php knowledge you will frequently encounter in modern projects.

Arnaud Becher 1.1k Jan 2, 2023
A lot of scripts and packages in modern PHP demand one or more configuration classes

A lot of scripts and packages in modern PHP demand one or more configuration classes. Mostly, those are a set of properties that can be set, changed or retrieved. However, some of the configurations have a peculiar behaviour - such as boolean properties.

Carlos Artur Curvelo da Silva Matos 2 Mar 8, 2022