fix(PHP): sanitize and produce metrics at shutdown

This change now requires that PHP routes do not return HTTP 404
to be considered for the /metrics population. Additionally,
we make a small sanitization here to avoid trailing '/'
characters, unless we're on the homepage route.

Signed-off-by: Kevin Morris <kevr@0cost.org>
1 job for master in 31 seconds (queued for 7 seconds)
Status Name Job ID Coverage
  Test
passed test #36519

00:00:31