Sorry to be the guy decrying PHP, but the only arguments I've found in it's favor are it's ubiquity and being sometimes "the right tool for the job" if you're quickly hacking together a dynamic webpage.
Surely a simple cli app isn't the right job for this tool.
Now, all that said, it _does_ work, and blahblahblah.