Since we wrote our own pushpool replacement, we did all the scoring calculations there. You are correct, PHP wouldn't be the place to do them. Neither is SQL though. To do it right you'll want to do it in your pool backend, which is pushpool I'm assuming? You'll want to keep the shares in memory, and do your scoring computations off of the in-memory copy.
I'm a little unclear on how you'd achieve keeping the scoring information in memory in a long round without taking up an extraordinary amount of memory? But regardless, how do you pass that information off to a web browser looking for it? Additionally, how do you handle (or do you not) multiple getwork servers? Each one would have differing information.