Php improvements