PHP on the Command Line
摘要
Once upon a time, the acronym PHP stood for Personal Home Page. Even after the language was renamed and the initials resolved to the recursive PHP Hypertext Preprocessor, the name remained overtly a webby affair. Nonetheless, PHP works very well on the command line. In fact, if you’re sure that your target environment will furnish you with the PHP interpreter, it may be the best possible tool for your shell scripting tasks. Written in the right way, a PHP script created for the command line can do everything that a more traditional shell script can do, with all the power and familiarity of a fully featured object-oriented language and the rich library infrastructure provided by Composer.