This is a really good question and I don't have much of an answer. I use many command-line tools, but basically all of them from the command-line! Providing you sanitise your inputs really well though, there's no reason you shouldn't shell out to the operating system from PHP IMO