While a webserver is certainly not required to use PHP, the PHP interpeter itself definitely is.
If you want to compile your PHP source code into a standalone application (e.g. one that doesn't require the users to first install/setup PHP on their PCs)... well, there supposedly are options out there to do this (Google "PHP standalone application" or something of the sort), I personally have never used them. I tried once ages ago but gave up after running into too many issues with it.
EDIT: Having said all of the above, however, I do mostly agree with planetphp's "php isn't made for this sort of thing" statement.
Perhaps the real issue is that you should choose a better language for the task at hand? If you're trying to distribute the app to other PCs, for example, I would suggest staying away from interpreted languages (PHP, Python, etc.) unless you can ensure that the language interpreter is properly installed/configured on all of the destination PCs.