Improve build php script