This under-appreciated feature has a couple upsides: 1) speed, 2) debug – it prints (or echos) as it processes, so you can easily break or debug to a particular line or, for example, in a loop iteration when running through a mysql resultset. Very simple use as well. On windows, just open cmd and input:

C:\Path\To\PHP\php.exe -f "C:\Path\To\your-script.php"

The “-f” just tells it to run a PHP file. You can also pass arguments (instead of request variables) – more detail here: