php: Bug fixes for php by Ye Yen.