rsk wrote:
Isn't php-cli hardcoded to never timeout no matter what you set in php.ini?
Yes, unless you manually override it from inside the script by calling set_time_limit().
One side effect of this behavior is that if your script hangs for whatever reason, like an infinite loop, it will keep running until you kill it. So if you're going to run complicated PHP scripts repeatedly from cron, it's often a good idea to check if the previous run has completed successfully.
As for memory leaks, they are mostly a thing of the past, unless you use a horribly badly written library. In PHP 5.3, calling gc_enable() at the beginning usually helps, even in the case of rogue libraries.