What's Changed in PHP 8.2

preview_player
Показать описание
In this video, Scott discusses what new features are being added to PHP in the 8.2 release and outlines the deprecations and breaking changes

00:00 Intro
00:59 Warnings
01:33 New Features
01:37 Readonly Classes
01:57 Disjunctive Normal Form Types
02:35 Constants in Traits
02:49 Redacted Parameters in Backtraces
02:32 Fetch Properties of Enums in Const Expressions
03:49 null, true, and false Stand Alone Types
03:58 Cloudways
05:14 Deprecated Functions/Features
05:24 Deprecate dynamic properties
05:54 Deprecated utf8_encode and utf8_decode
06:14 Deprecate `${}` string interpolation
06:36 Breaking changes
06:34 DateTime Return Types
07:03 Locale-insensitive strtolower() and strtoupper()
07:29 Outro

php[architect] is an industry-leading publication focused on the PHP language. We are for developers written by developers. Publishing great PHP content since 2002 and dedicated to providing educational material to the PHP programming community.

Twitter: @phparch

This video is sponsored by Cloudways
Cloudways offers peace of mind and flexibility so you can focus on growing your business instead of dealing with server management. With Cloudways, you get an optimized stack, managed servers, backups, staging environment, integrated Git, pre-configured, Composer, 24/7 support, and a choice of five cloud providers: AWS, DigitalOcean, Linode, Google Cloud, and Vultr.

Get a discount 20% for 3 months by using code "PHPARCH"

Рекомендации по теме
Комментарии
Автор

The sound is cut between the video cuts, with words either in part or completely missing - like 5:14. Not a tragedy, just something I hope won't be an issue in the future.

kneekoo
Автор

I love PHP, but recently there have been some mess going on with SPL file APIs, such as SplFileObject::fgets that behaves differently depending on the PHP version. This makes it very hard for developers that develop applications that has to run under multiple PHP versions, such as WordPress plugin developers, that ship code on our client's infrastructures. Example 3v4l: GKCuj

LucasBustamante
Автор

I hope you're right about the language stabilizing. I could use a few years of reduced upgrade burden. 😏

SyntaxSeed
Автор

Did PHP remove the requirement to prefix variable name with a dollar sign? If so, that would be great.

cbbcbb
Автор

It would be nice if deprecating functions would not brake old code.

Something like a static class that would automatically find deprecated and replace them or give you the option to quickly finding them giving you the possible substitute.

I remember with PHP 5.5, the replacement for most deprecated was relatively easy to automate.

I mean, most people simply silent the warnings; but it would be nice to write clean code from the start.

guiller