Skip to main content

What's new in PHP 8.1 - #87


Published: March 17, 2022 | DevDrawer


Estimated Reading Time
1 minutes
Video Duration
48:33 minutes

If you are still using PHP 7 or just starting with PHP 8 you need to watch this tutorial on some of the new features you can start using now with PHP 8.1. Make your code faster, cleaner, and easier to read with some of the cool and long-requested features of PHP8.1.

Learn the new features of PHP8.1 in this tutorial by first looking at what you would have done in PHP7 compared to what you can do in PHP8.1. Most of these new functions or methods will work with PHP8 as well, but if you have not tried it out yet, I would recommend switching to PHP8.1 before trying this tutorial.

00:00 Intro

01:10 NULLSafe Operators

09:40 Constructor Property Promotion

18:48 Match Expressions

24:30 $object::class

28:07 Named Parameters

35:53 String Helpers (str_contains)

42:27 Union & Pseudo Types

View on GitHub: https://github.com/thedevdrawer/php8-1-features

Join this channel to get access to perks:

https://www.youtube.com/channel/UCcr8eSk5xCfn3AbYy8WOWzg/join

Become a Patreon to show support and get exclusive access to content: https://www.patreon.com/devdrawer