You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a know problem; IIRC, there is a shortcut in the "parser" to find the port, and that can screw up proper handling of relative URLs with colon-portlike in the path.
That is basically documented:
Partial and invalid URLs are also accepted, parse_url() tries its best to parse them correctly.
"Its best" is just not good enough here.
I don't think it makes sense to try to fix that (might break too many other edge cases), and since there is an RFC under discussion which would introduce proper URL/URI parsers anyway, it might make even less sense to fiddle with parse_url().
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.4.4
Operating System
No response
The text was updated successfully, but these errors were encountered: