What's New in PHP 8.1
summary
Covers concrete, engine-level changes with code examples and demo outputs so watchers learn what actually works now: Enumerations with backed values and methods, the new never return type, intersection types, Fibers (cooperative multitasking), array_is_list, new initializers and readonly properties, Intl date pattern fixes, and globals behavior change. Shows xdebug dumps and runtime behavior, points out deprecations and default MySQL error changes, and demonstrates where code will break and how to fix it.
AI-written summary · about
chapters (30)
- 0:00Introduction
- 2:32enum type
- 3:27enum example
- 9:04Static values inside functions
- 11:00Never type
- 12:25Class constants
- 12:52PHP type system
- 14:07Pure intersection types
- 15:24splat operator in arrays
- 16:23named arguments
- 17:55newinitializers
- 19:11new attributes
- 20:16readonly
- 21:24octal
- 22:47intel extension
- 26:19fibers
- 26:59pippa
- 28:05Array is just values
- 28:35mysql error mode
- 29:02Globals
- 30:25Globals Restrictions
- 31:50Serializable Interface
- 33:53PHP 81
- 34:18No to nonnullable arguments
- 34:48PHP H1
- 37:02Return Types
- 38:58Applications
- 42:21PHP Internals
- 44:07Questions
- 46:26Conclusion








