Web Development · WDC-49

PHP 8 New Features

PHP 8 New Features is a course on what changed in PHP from 8.0 to 8.5, including named arguments, match, enums, readonly properties, attributes, property hooks and the pipe operator, together with deprecated and removed features and how to move code from PHP 7. It suits web developers still writing PHP 7 and administrators who need to upgrade PHP websites.

Updated
From 3,150 THB / person 3,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration6 hours · 1 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

PHP still powers a large share of the web, but the language has changed a great deal from PHP 8.0 to PHP 8.5, the current release, with shorter syntax, a stricter type system, enums, readonly properties, property hooks and the pipe operator. Meanwhile every PHP 7 release has long been out of support, and PHP 8.2 stops receiving security fixes at the end of 2026, so systems on older versions should plan their upgrade soon.

This course is a hands-on summary of what is new in PHP from 8.0 to 8.5, from named arguments, match, nullsafe, union types, enums, readonly, attributes, property hooks, asymmetric visibility, the pipe operator and clone with to generators, fibers, deprecated and removed features, JIT and OPcache. It finishes with a workshop that moves PHP 7 code using MySQL to PHP 8.5 with tools that check and convert the code. (1 day, 6 hours, Intermediate level.)

What you’ll gain

  • Understand the support timeline of each PHP version and plan upgrades
  • Use new syntax such as named arguments, match and the nullsafe operator
  • Use the new type system: union, intersection, DNF, never and typed class constants
  • Write modern classes with constructor promotion, readonly, enums and attributes
  • Use PHP 8.4 and 8.5 features such as property hooks and the pipe operator
  • Move PHP 7 code to PHP 8.5 safely with PHPStan and Rector

Who this course is for

  • Web developers writing PHP 7 who want to update to PHP 8.5
  • System administrators and IT staff who maintain or upgrade websites written in PHP
  • Developers using Laravel, Symfony, WordPress or CodeIgniter who want to understand the modern language
  • Teachers, lecturers and students who teach or learn PHP and want up-to-date material

Prerequisites

  • Able to write PHP 7, with a basic grasp of functions, arrays and classes
  • Some experience of building websites and working with MySQL
  • Basic command-line use
  • A Windows, macOS or Linux laptop with rights to install software

Curriculum

Course Details

This course is the 2026 edition of PHP 8 New Features, which originally focused on PHP 7 and PHP 8.0. It now covers PHP 8.0 to PHP 8.5, the current release. It runs for 1 day, 6 hours (09:00-16:00), as short explanations followed by hands-on coding for every topic. Intermediate level. The morning covers support timelines and installing PHP 8.5, new syntax, the stricter type system, modern classes with readonly and enums, and attributes. The afternoon covers what is new in PHP 8.4 and 8.5, such as property hooks and the pipe operator, then generators, fibers, deprecated features and performance, finishing with a workshop that moves PHP 7 code using MySQL to PHP 8.5 with PHPStan and Rector. All tools are free.

Day 1: What's New from PHP 8.0 to PHP 8.5

Section 1 Lab: Meet PHP 8 and Install PHP 8.5
  • The path from PHP 7 to PHP 8.5 and the support timeline of each version
  • Choose a version for production and plan the upgrade
  • Install PHP 8.5 with Docker or Laravel Herd
  • Lab: check the version, extensions and php.ini settings with php -v and php -i
Section 2 Lab: New Everyday Syntax
  • Named arguments and the risk of renaming parameters
  • The match expression compared with switch
  • The nullsafe operator and first-class callable syntax
  • The string functions str_contains, str_starts_with and str_ends_with
  • Lab: rewrite existing PHP 7 code to be shorter and clearer
Section 3 Lab: A Stricter Type System
  • Union types, mixed and the never return type
  • Intersection types and DNF types
  • Standalone null, true and false types
  • Typed class constants and enabling strict_types
  • Lab: add types to existing functions and fix the mismatches
Section 4 Lab: Modern Classes with Promotion, Readonly and Enums
  • Constructor property promotion and new in initialisers
  • Readonly properties and readonly classes
  • Pure and backed enums with methods and interfaces
  • Lab: an order status value object with enums and readonly
Section 5 Built-in and Custom Attributes
  • Attributes in place of old docblock annotations
  • #[Override], #[SensitiveParameter] and #[Deprecated]
  • #[NoDiscard] in PHP 8.5 for return values that must be used
  • Create a custom attribute and read it with reflection
Section 6 Lab: What's New in PHP 8.4
  • Property hooks in place of getters and setters
  • Asymmetric visibility with private(set) and protected(set)
  • Chain a method call after new without wrapping parentheses
  • array_find, array_any and array_all
  • Lab: update a product class to use property hooks
Section 7 Lab: What's New in PHP 8.5
  • The pipe operator (|>) for chaining processing steps
  • Clone with, for copies that change a few properties
  • The URI extension for parsing and validating URLs to the standards
  • array_first, array_last and closures in constant expressions
  • Lab: a data formatting function built with the pipe operator
Section 8 Generators and Fibers
  • Generators, yield and saving memory with large data sets
  • yield from and generator return values
  • How fibers work, and how they compare with generators
  • The Random extension for secure random values
Section 9 Deprecated Features and Performance
  • Saner string-to-number comparisons, and warnings that became TypeError or ValueError
  • Removed functions such as create_function() and each()
  • Deprecated dynamic properties, implicitly nullable types and ${} in strings
  • What JIT, OPcache and preloading can do for you
Section 10 Workshop: Moving PHP 7 Code to PHP 8.5
  • Turn on all errors and deprecation notices before starting
  • Check the code with PHPStan and convert it automatically with Rector
  • Connect to MySQL with PDO and mysqli, which throw exceptions by default
  • Workshop: upgrade a sample database-backed system so it runs fully on PHP 8.5
  • A checklist before moving production systems

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What are named arguments in PHP 8 and how do you use them?

Named arguments let you pass values to a function by parameter name, for example htmlspecialchars($text, double_encode: false). You can skip parameters that have defaults without filling in every value in order, and the call shows clearly what each value means. The catch is that parameter names become part of the API, so renaming one later breaks calls that use the name.

What are property hooks in PHP 8.4, and how do they differ from getters and setters?

Property hooks let you attach get and set logic directly to a property, for example validating a value before it is stored or calculating it when read. Callers still use $product->price like a normal property, so you no longer need a getPrice() and setPrice() pair for every property, and you can add logic to a plain property later without changing the calling code. Combined with asymmetric visibility such as public private(set), a property can be read from outside but changed only inside the class.

What are the steps to move code from PHP 7 to PHP 8.5?

Start by installing PHP 8.5 on a development machine, separate from production, and turn on all errors and deprecation notices. Check the code with PHPStan to find type mismatches and calls to removed functions, and let Rector convert what it can automatically. Then run the tests and look at the usual trouble spots, such as create_function() and each(), string-to-number comparisons that now behave differently, warnings that have become TypeError, and dynamic properties. Move to production once everything is fixed.

Who is the PHP 8 New Features course for, and what should I know beforehand?

It suits web developers writing PHP 7 who want to update to PHP 8.5, administrators and IT staff who need to upgrade PHP websites, developers using frameworks such as Laravel or WordPress, and teachers who teach PHP. You should be able to write PHP 7, understand functions, arrays and classes, and have some experience with MySQL.

What will I be able to do after the PHP 8 New Features course?

You will be able to plan upgrades around PHP's support timeline, use new syntax such as named arguments, match and nullsafe, add stricter types to your code, write classes with constructor promotion, readonly, enums and attributes, use the latest property hooks and pipe operator, know what has been deprecated or removed, and move PHP 7 code that uses MySQL to PHP 8.5 with PHPStan and Rector. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the PHP 8 New Features course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as reviewing what needs fixing to move the PHP 7 systems your team maintains to PHP 8.5. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.

Related articles

Articles are published in Thai.