parse_url() return false on absolute path containing : and no query string.
The following code:
<?php
var_dump(parse_url('/page:1?foo=bar')); // Working example of parsing.
var_dump(parse_url('/page:1'));
var_dump(parse_url('/page:1', \PHP_URL_SCHEME));
We should still fix this case IMHO. The engine currently fails to parse valid URLs.
I implemented a workaround in https://github.com/symfony/symfony/pull/58218 but this is not pretty :)
Description
parse_url()
returnfalse
on absolute path containing:
and no query string.The following code:
Resulted in this output:
But I expected this output instead:
This issue is opened following discussion on Symfony DomCrawler: https://github.com/symfony/symfony/issues/52628
PHP Version
8.1.12
Operating System
No response