How to read FULL url?

Hi guys,

consider this:

How can i read the full url in PHP?
Tons of scripts and examples but the closest they get is

i need to read the entire thing including “#test

in javascript this is done with:

how is this done in PHP?