News

PHP 8.6 is released!

Published
PHP 8.6 is released!  image

PHP 8.6 is now out! This post covers the new features, changed defaults, and deprecations in the release. For the release announcement, see our full What's new in PHP 8.6 post.

PHP 8.6 Features

  • Partial function application (PFA) lets you call a function with some arguments filled in and get back a closure that takes the rest.
  • Clamp Function returns the value if it falls within the bounds, or the nearest bound if it does not
  • A Time\Duration Class, a final readonly class that represents a stopwatch-style length of time with nanosecond precision. It has factory methods for each unit, arithmetic methods, and comparison support:
  • Readonly Property Defaults, readonly properties can have a default value. Before 8.6 this was a compile-time error, which made it awkward to satisfy get-only interface properties from PHP 8.4 with a fixed value
  • Plus much more!

You can check out our coverege of What's new in PHP 8.6 and the official PHP 8.6 landing page.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Laravel Warrant: Row-Level Permissions With Eloquent image

Laravel Warrant: Row-Level Permissions With Eloquent

Read article
JSON Schema Validation Rules and a RetryFor Attribute in Laravel 13.43 image

JSON Schema Validation Rules and a RetryFor Attribute in Laravel 13.43

Read article
Durable Workflow: Long-Running Workflows for Laravel image

Durable Workflow: Long-Running Workflows for Laravel

Read article
Session Replay for Laravel: Self-Hosted Browser Recordings image

Session Replay for Laravel: Self-Hosted Browser Recordings

Read article
Laravel AI SDK 1.4 Lets Agents Recover From Tool Failures image

Laravel AI SDK 1.4 Lets Agents Recover From Tool Failures

Read article
Laravel Read Replicas: Check if a Replica Has Caught Up image

Laravel Read Replicas: Check if a Replica Has Caught Up

Read article