PHP 8.3 Documentation

Official documentation for PHP 8.3, including new features, performance improvements, security enhancements, and how to upgrade from previous versions.

Introduction

PHP 8.3 is a major release packed with powerful performance improvements, new language features, and bug fixes. This version is fully backward compatible with PHP 8.2 while offering significant enhancements for modern web development.

This version is recommended for all production environments. It includes the latest security patches and performance optimizations for both server-side and CLI applications.

Release Date

2025-08-15

Version Status

Stable

End of Support

2027-12

New Features in PHP 8.3

Union Types 2.0

Enhanced support for complex type declarations now includes nested unions using the | operator.

function formatInput( string|bool|float $input ) : mixed|void { ... }
Learn more →

Improved Null Coalesce

New syntax allows chaining null-safe operators with default values directly in expressions without additional parentheses.

$data = $request?->input?->value ?? "default";
🚀

JIT Enhancements

20% faster execution for CPU-intensive scripts with optimized tracing compiler.

🛡️

Safe Mode

Experimental mode to block deprecated APIs with automatic migration suggestions.

🔍

Improved Error Handling

New try-catch extensions for context-aware exception logging.

Performance Optimizations

Memory Usage

Memory consumption reduced by up to 30% in long-running applications using the new garbage collection cycle.

vs PHP 8.2

Execution Speed

Critical microbenchmarks show 18-25% performance gains in standard application scenarios.

vs PHP 8.2

Security Updates

TLS 1.5 Enforcement

All built-in HTTP clients now require TLS 1.5 by default for secure communications.

// Automatic upgrade for all network functions
Fixed 12 critical OpenSSL vulnerabilities
Password hashing algorithm 3.2
Improved JWT validation

Changelog

[FEATURE]

Native WebAssembly Support

Add $php->webAssembly() API to convert PHP scripts to .wasm binaries for use in modern microservices architectures.

php -wasm hello.php
[IMPROVEMENT]

Optimized Regex Engine

45% faster PCRE engine using new JIT compiler optimizations for patterns using ($

[ENHANCEMENT]

Type Inference Improvements

The compiler can now automatically infer complex array types with nested union declarations.