... You could simply create a PHP file on your folder at c:/calculator. Create a file named index.php and paste that code in, save.
Open your browser and enter the folder's direction. C:/calculator/index.php
You should be able using that as well as a website based mini application, just for you.
(note the slashes may be backslashes. Writing this with a tablet, which is lacking apps (rooted it, apps gone

)).
The entrance for x and y have been declared there already, so you don't need to be afraid that it won't work.