I surely hope nothing like that exists. For some ports it may not be that drastic, but what if I write an application that tries to bind on port 80? Boom! No more webserver. Port 135? Boom! File sharing is gone.
Instead
you should close your application nicely, so it will unbind the port itself.
And by the way, port 4000 is reserved for something called Terabase. See
IANA port numbers.