I'm not sure how these ever ended up in the repository.
Move py_to_php to a per-class function.

In interpreter mode, if nothing else, this should be quicker than the nasty
switch statement that conversion.py_to_php had become (I don't know why doing
this didn't occur to me earlier!).

There is a corresponding patch in PyPy.