opitimize php code destory method.