PHP

PHP 8.1 Released

June 8, 2023

The PHP development team is thrilled to announce the immediate availability of PHP 8.1. This release delivers significant improvements in performance, concurrency, and type safety while introducing powerful new features for developers.

Key Features

1. Enumerations

PHP 8.1 introduces native enums with full type safety and support for scalar values, custom properties, and methods. Create strongly-typed state machines with simple, expressive syntax.

2. Union Types

Union types enable more flexible type declarations for parameters and return values. Combine two or more scalar or class types in a single declaration for better code expressivity and validation.

3. Fiber Support

Fiber objects provide support for multi-threaded execution patterns in PHP. Combine generators with fiber-aware code to build efficient, scalable concurrent applications with minimal resource overhead.

Ready to upgrade?

Download PHP 8.1