Well, no. PHP runs on the server - after the stuff gets sent to the client PHP has nothing more to do with it - PHP functions won't run after the page has loaded, because there aren't any PHP functions in the page (use the browser to view the source if you don't believe me).
Why would you want to run a PHP function as your onSubmit handler?