Pound signs aren’t really recognized like that. If you want the specific reply number, you should target that with a regular <a> tag with an ID of that specific reply number.
PHP rarely receives the anchor portion of the URL - the browser may choose not to transmit it in the request. This is more often the domain of Javascript to play with.
If it’s part of the URL you receive, parse_url would be the way to go.
No, parse_url should work. It’ll be in the fragment index array.
What are you trying to achieve? The idea doesn’t sound right. If you want to select 1 specific reply and display it to the screen based on a link like that, then I can see how this would make sense. But if you’re trying to get the user to that specific reply, it doesn’t make sense at all and what I said in my initial response would be the way to go.
That’s funny, but looks like fragment-part ignored in $_SERVER['REQUEST_URI'] and not found anywhere else in $_SERVER. Hm… I just don’t know, how can I get it.
From a bit of reading just now, it seems that the issue here is not PHP, but that the browser does not actually send the anchor (the bit after the # symbol) to the server as @m_hutley said above. Presumably it retains that part, and when the page content arrives, searches through the content for the appropriate tag and sets focus there. So if it isn’t sent to the server, you won’t be able to access it regardless of what server-side language you use. Your server logs would confirm that the request does not contain it.