AFAIK, a button only knows what to do from the form attributes action and method. So it would have to be in a form. (Try it without and see if you can get it to do anything.) Anyway, include info about which php function to run in hidden fields in the form.
PHP operates on the server side, so you'd have to submit the page in order for the server to run php. It's not like javascript which runs on the client. (I mention this cause your question seems to be talking about running php in the client window.)