fix generated semi-standalone php calling code