{"id":1296,"date":"2026-05-08T18:00:00","date_gmt":"2026-05-08T17:00:00","guid":{"rendered":"https:\/\/wade.one\/blog\/?p=1296"},"modified":"2026-05-08T18:00:00","modified_gmt":"2026-05-08T17:00:00","slug":"php-8-5s-uri-extension-fixes-a-real-web-problem","status":"publish","type":"post","link":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/","title":{"rendered":"PHP 8.5&#8217;s URI Extension Fixes a Real Web Problem"},"content":{"rendered":"<p>PHP 8.5&#8217;s new URI extension is the kind of feature that sounds boring until you remember how much web software depends on getting URLs right. <code>parse_url()<\/code> has been useful for years, but URLs are messier than the tidy examples in documentation. Browser-style URLs, RFC 3986 URIs, user input, redirects, proxies, and security checks all meet in the same code path eventually.<\/p>\n<p>The <a href=\"https:\/\/www.php.net\/releases\/8.5\/\">PHP 8.5 release announcement<\/a> puts the new extension near the top of the release, and the <a href=\"https:\/\/wiki.php.net\/rfc\/url_parsing_api\">URI RFC<\/a> explains why: PHP now has an always-available API for RFC 3986 and WHATWG URL handling. That matters because web applications often need to reason about a URL in the same way browsers, clients, and upstream services do.<\/p>\n<p>The practical win is not that every project should immediately replace every tiny use of <code>parse_url()<\/code>. The win is that serious URL handling no longer has to start with a vague helper, a framework wrapper, or a pile of edge-case tests around string functions. If you are validating callback URLs, normalising links, building crawlers, processing feeds, or dealing with tenant domains, a proper URI object gives you a better place to stand.<\/p>\n<p>This is also a good reminder of what makes PHP releases useful in production. The headline features get attention, but the quiet standard-library improvements are often what reduce the most accidental complexity. A built-in URI API will not make bad validation good by itself, but it should make correct validation easier to write and easier to review.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP 8.5&#8217;s new URI extension is not flashy, but it gives PHP a better built-in answer for parsing modern URLs.<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[28,13],"tags":[35,36,144,145],"class_list":["post-1296","post","type-post","status-publish","format-standard","hentry","category-php","category-programming","tag-php","tag-php-8-5","tag-uri","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP 8.5&#039;s URI Extension Fixes a Real Web Problem - wade.one<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP 8.5&#039;s URI Extension Fixes a Real Web Problem - wade.one\" \/>\n<meta property=\"og:description\" content=\"PHP 8.5&#039;s new URI extension is not flashy, but it gives PHP a better built-in answer for parsing modern URLs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/\" \/>\n<meta property=\"og:site_name\" content=\"wade.one\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-08T17:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/Wade-Logo-cropped.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1518\" \/>\n\t<meta property=\"og:image:height\" content=\"1506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:site\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"PHP 8.5&#8217;s URI Extension Fixes a Real Web Problem\",\"datePublished\":\"2026-05-08T17:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/\"},\"wordCount\":250,\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"keywords\":[\"php\",\"php-8-5\",\"uri\",\"web-development\"],\"articleSection\":[\"PHP\",\"Programming\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/\",\"name\":\"PHP 8.5's URI Extension Fixes a Real Web Problem - wade.one\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\"},\"datePublished\":\"2026-05-08T17:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/05\\\/08\\\/php-8-5s-uri-extension-fixes-a-real-web-problem\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wade.one\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP 8.5&#8217;s URI Extension Fixes a Real Web Problem\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/\",\"name\":\"wade.one\",\"description\":\"wade womersley - york based software engineer\",\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wade.one\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\",\"name\":\"Wade Womersley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"contentUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"width\":202,\"height\":200,\"caption\":\"Wade Womersley\"},\"logo\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP 8.5's URI Extension Fixes a Real Web Problem - wade.one","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/","og_locale":"en_GB","og_type":"article","og_title":"PHP 8.5's URI Extension Fixes a Real Web Problem - wade.one","og_description":"PHP 8.5's new URI extension is not flashy, but it gives PHP a better built-in answer for parsing modern URLs.","og_url":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/","og_site_name":"wade.one","article_published_time":"2026-05-08T17:00:00+00:00","og_image":[{"width":1518,"height":1506,"url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/Wade-Logo-cropped.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@wadewomersley","twitter_site":"@wadewomersley","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/#article","isPartOf":{"@id":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/"},"author":{"name":"","@id":""},"headline":"PHP 8.5&#8217;s URI Extension Fixes a Real Web Problem","datePublished":"2026-05-08T17:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/"},"wordCount":250,"publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"keywords":["php","php-8-5","uri","web-development"],"articleSection":["PHP","Programming"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/","url":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/","name":"PHP 8.5's URI Extension Fixes a Real Web Problem - wade.one","isPartOf":{"@id":"https:\/\/wade.one\/blog\/#website"},"datePublished":"2026-05-08T17:00:00+00:00","breadcrumb":{"@id":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wade.one\/blog\/2026\/05\/08\/php-8-5s-uri-extension-fixes-a-real-web-problem\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wade.one\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP 8.5&#8217;s URI Extension Fixes a Real Web Problem"}]},{"@type":"WebSite","@id":"https:\/\/wade.one\/blog\/#website","url":"https:\/\/wade.one\/blog\/","name":"wade.one","description":"wade womersley - york based software engineer","publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wade.one\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3","name":"Wade Womersley","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","contentUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","width":202,"height":200,"caption":"Wade Womersley"},"logo":{"@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1152,"url":"https:\/\/wade.one\/blog\/2026\/03\/25\/php-8-5-4-released-upgrade-if-you-re-on-8-5\/","url_meta":{"origin":1296,"position":0},"title":"PHP 8.5.4 Released: Upgrade if You&#8217;re on 8.5","author":"","date":"March 25, 2026","format":false,"excerpt":"PHP 8.5.4 is a bug-fix release, not a feature release. If you are already on PHP 8.5, you should update. If you are still on 8.4, this alone is not the reason to jump.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1298,"url":"https:\/\/wade.one\/blog\/2026\/05\/10\/php-8-5-clone-with-makes-value-objects-less-annoying\/","url_meta":{"origin":1296,"position":1},"title":"PHP 8.5 Clone With Makes Value Objects Less Annoying","author":"","date":"May 10, 2026","format":false,"excerpt":"PHP 8.5's clone-with syntax makes immutable value objects easier to work with, especially around readonly properties.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1299,"url":"https:\/\/wade.one\/blog\/2026\/05\/11\/php-8-5-nodiscard-is-a-small-api-safety-feature\/","url_meta":{"origin":1296,"position":2},"title":"PHP 8.5 NoDiscard Is a Small API Safety Feature","author":"","date":"May 11, 2026","format":false,"excerpt":"PHP 8.5's NoDiscard attribute gives library and application code a direct way to say that ignoring a return value is probably a bug.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1297,"url":"https:\/\/wade.one\/blog\/2026\/05\/09\/php-8-5s-pipe-operator-is-for-readable-code-not-clever-code\/","url_meta":{"origin":1296,"position":3},"title":"PHP 8.5&#8217;s Pipe Operator Is for Readable Code, Not Clever Code","author":"","date":"May 9, 2026","format":false,"excerpt":"The PHP 8.5 pipe operator is useful when it makes data transformations read forwards, but it should not become a new way to hide simple code.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1300,"url":"https:\/\/wade.one\/blog\/2026\/05\/12\/php-8-5-fatal-error-backtraces-are-an-operations-feature\/","url_meta":{"origin":1296,"position":4},"title":"PHP 8.5 Fatal Error Backtraces Are an Operations Feature","author":"","date":"May 12, 2026","format":false,"excerpt":"PHP 8.5 adding backtraces to fatal errors is a practical production debugging improvement, not just nicer developer output.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1120,"url":"https:\/\/wade.one\/blog\/2023\/03\/28\/php-in-2023-why-its-still-relevant-and-a-smart-hiring-decision\/","url_meta":{"origin":1296,"position":5},"title":"PHP in 2023: Why It&#8217;s Still Relevant and a Smart Hiring Decision","author":"Wade","date":"March 28, 2023","format":false,"excerpt":"There are few languages that have stood the test of time like PHP. First introduced in 1994, PHP has been powering websites for nearly three decades. While many new and powerful languages have emerged since then, PHP remains an essential tool in the web developer's arsenal. In this blog post,\u2026","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/1296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/comments?post=1296"}],"version-history":[{"count":1,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/1296\/revisions"}],"predecessor-version":[{"id":1310,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/1296\/revisions\/1310"}],"wp:attachment":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/media?parent=1296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/categories?post=1296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/tags?post=1296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}