Description
The following code:
<?php
new \Uri\WhatWg\Url('https://example.com:432')->withPort(-1)->toAsciiString();
Resulted in this output:
'https://example.com:432'
But I expected this output instead:
Uri\WhatWg\InvalidUrlException: The specified port is malformed (PortOutOfRange)
see: https://3v4l.org/q66W3/rfc#vgit.master
PHP Version
Operating System
No response