See this old and still very useful article:
Apache Tips & Tricks: Hide PHP Version (X-Powered-By)
I would also like to add that in systems that I develop or participate this element of the header is always masked or removed. I say masked with the domain name for example.
This is because it is information that can bring insecurity. That is, masking your content by itself does not put the system safer only prevents
the remote host to realize the system and the PHP
version that is running.
We all know that all versions in any software have their flaws and all are documented over the lifetime of it and PHP
is no exception.
The analysis of this type of information allows you to understand what the flaws that this version specifically will have and from there may break some security holes with consequent attacks.
UPDATE:
It should also be noted that in elements CSS
, JS
or imagens
belonging to a page that "mascar" this header element this can be viewed normally, so if the option is to mask the contents of this header element the same must be done for any type of elements that require% autonomous%.