Hi. You can't transfer from a tourist visa to a spouse visa. You would have to go back to Philippines and apply for a spouse visa from there. The other option is to apply for a fiancee visa rather than a tourist visa, but it is a lot more expensive. You can change to a spouse visa directly from that.
Sorry. Posted my mistake here. Feel free to delete But, yes, you need fiancee visa if you want to stay here after getting married.
Hi Shengsei1990 and welcome. Note that you are not allowed to enter the UK on a tourist visa and then get married whilst still on the visa, this is one of the many reasons that the UK tourist visas are very difficult to obtain. You will need to apply for a Fiancée visa from the Philippines or if you decide to marry in the Philippines then come to the UK you will need to apply for a Spouse visa which is the same price as a Fiancée visa and the paperwork is almost the same. Good luck