I guessed it was what was supposed to happen. So that must mean PHP parses comments?
I was just caught out when I wanted to comment out the below line as I put a copy of my regex in a comment while I made a change to it. Then suddenly the rest of my code was being displayed on the screen!
// $match = "/<\/?\w+((\s+(\w|\w[\w-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>/i";