PHP refactor.