If i request site/page.php#hash the $_SERVER[\'REQUEST_URI\'] is only /page.php.
site/page.php#hash
$_SERVER[\'REQUEST_URI\']
/page.php
Is there a way to know in php (without later
Short answer: No.
The hash isn't passed to the server, it exists only on the client-side. This is by design. If the solution to your problem involves needing to know the hash server-side, you've chosen the wrong way to go about it.