you can run php script even with web server "e.g in case you only need to send and receive certain input/output " just add
#!/usr/bin/php-cgi -f
in very top of your php file and change it to excitable with this command
chmode +x /yourpath/index.php
when you want to run it us it name and hit enter
/yourpath/index.php