I stumbled upon a strange looking incrementing port-number right after my loopback ip when using the PHP development server, that i am unfamiliar of and can't really find information on the web about it.
$ php -S 127.0.0.1:3000
which logs requests like this:
[Tue Aug 17 16:18:19 2021] 127.0.0.1:65533 [200]: GET /
[Tue Aug 17 16:18:19 2021] 127.0.0.1:65533 Closing
[Tue Aug 17 16:18:19 2021] 127.0.0.1:49152 Accepted
[Tue Aug 17 16:18:19 2021] 127.0.0.1:65534 [200]: GET /
[Tue Aug 17 16:18:19 2021] 127.0.0.1:65534 Closing
[Tue Aug 17 16:18:19 2021] 127.0.0.1:65535 Accepted
[Tue Aug 17 16:18:19 2021] 127.0.0.1:49152 [200]: GET /
[Tue Aug 17 16:18:19 2021] 127.0.0.1:49152 Closing
[Tue Aug 17 16:18:19 2021] 127.0.0.1:49153 Accepted
At first i've thought that this incrementing port represents a line number in a hidden log file that i unsuccessfully tried to find - you can call me stupid ;)
Then, after trying to overflow that counter by spamming it with hey
i've noticed that it overflows on 65535 which tells me it's a 16-Bit integer of some sort.
Can you explain to me what this port number stands for / why php shows me this number in the first place? - I have a JavaScript Frontend background, so i'm quite unfamiliar how this TCP magic works and never seen it in Express/Fastify Application-Logs.