Amit Merchant 10/19/2025

The new, standards‑compliant URI/URL API in PHP 8.5

Read Original

The article details PHP 8.5's new RFC 3986 and WHATWG-compliant URI/URL API, which replaces the problematic `parse_url`. It explains the two new immutable classes, their differences in specification adherence and error handling, and provides code examples for parsing, validating, and accessing URL components.

The new, standards‑compliant URI/URL API in PHP 8.5

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes