phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

More specific type for 'port' component of 'parse_url()'

Open thg2k opened this issue 3 years ago • 1 comments

The port component can only be in the range 0-65535:

<?php
var_dump(parse_url("http://localhost:-1/"));    // false
var_dump(parse_url("http://localhost:0/"));     // [ ... ]
var_dump(parse_url("http://localhost:65535/")); // [ ... ]
var_dump(parse_url("http://localhost:65536/")); // false

thg2k avatar Aug 15 '22 10:08 thg2k

I'm sorry I just realized I missed a couple of tests, gotta love that CI.

Made another force push to fix that, let me know if there are other outstanding issues.

thg2k avatar Aug 16 '22 08:08 thg2k

gotta love that CI.

Yeah, I'm super-proud of that, thanks :)

And thanks for this PR!

ondrejmirtes avatar Aug 16 '22 11:08 ondrejmirtes