Unless the relationship was abusive its unlikely you would be granted ilr. so you would need to leave the uk when your visa ends. As even if your husband divorced you it would likely take longer than the time you have left. Also surely if your married in phill to your i guess ex husband it could cause problems if in the future you travel or decide to live in phill as they would still see the first marriage as valid? It would also be wise to seek proper legal advice to your status in the uk as in theory you have left when your marriage broke down possibly?