added php refactor script