I was just asked how to debug PHP, using Zend Studio, but for a CLI PHP script, as opposed to a normal web-based PHP script. (Web based debugging is easy - fire up Zend Studio, load up Firefox with the Zend Toolbar installed, and hit "Debug".)
To be honest, debugging your CLI PHP scripts is almost as easy! All you need to do is launch your PHP script from a simple bash script, that does a little bit of simple magic for you:
#!/bin/sh
export \
QUERY_STRING=\
"start_debug=1&debug_port=10000&debug_host=IP&debug_stop=1"
/path/to/php -q /path/to/script.php
Just replace IP with your IP address (be it 127.0.0.1, or whatever), launch Zend, and start debugging. Easy!
UPDATE: Zend have similar info on their site these days...