Using PHP as Desktop Software is not the best of options. But you have two ways of doing it.
With PHPDESKTOP and PHP-GTK .
I'm not an expert on desktop languages, but they will certainly advise you to use another language.
First, PHP is a interpreted language and as such, is not generated executable files. You can even create desktop applications using PHP-GTK , but since the language was not created for this purpose, several problems may occur.
If your goal is to run PHP (almost completely) without having to install anything on the client (besides PHP itself), you can use the internal language server. The command below creates a local server and allows access to PHP in localhost.
php -S localhost:80 -t /path/to/php/site
Just change the number 80 by the port you want and change the /path/to/php/site
to the path of your PHP script