refine withphp rule