Home >Backend Development >PHP Tutorial >Practical Tips: Using PHP as a Shell Scripting Language_PHP Tutorial
We all know that PHP is a very good dynamic web development language (fast speed, short development cycle...). But only a few people realize that PHP can also be used as a language for writing Shell scripts. When PHP is used as a language for writing Shell scripts, it is not as powerful as Perl or Bash, but it has good advantages. Especially for people like me who are familiar with PHP but not very familiar with Perl.
To use PHP as a shell scripting language, you must compile PHP as binary CGI instead of Apache mode; PHP compiled into binary CGI mode has some security issues. For solutions, see PHP Manual (