Update hprose for PHP

Refactored some code for PHP.