Most time we run the php program though the web browsers. But if we want to run the php program from command prompt then we know how to run on Windows and Linux machine.
On Windows machine
C:\> D:\path\to\php.exe -f "D:\path\to\www\myfile.php"
On Linux machine
php myfile.php
On Windows machine
C:\> D:\path\to\php.exe -f "D:\path\to\www\myfile.php"
On Linux machine
php myfile.php