February 27, 2021
Hot Topics:

PHP Command Line Scripting: Run Scripts from the Shell

  • By Glen Kunene
  • Send Email »
  • More Articles »

Did you know you can run PHP scripts from the command line using its command line interpreter (CLI) -- using your existing PHP language skills? Unless you use tools such as PHPDoc, Phing, or PHPUnit, you may not have been aware of this capability. In his PHPBuilder article Running PHP and Zend Framework Scripts from the Command Line, Jason Gilmore explains what you've been missing if you haven't yet used command line scripting in PHP. He writes:

PHP is configured with both execution duration and memory consumption limitations of 30 seconds and 128MB, respectively ... Therefore, you should use PHP's CLI when you need to complete tasks that could conceivably surpass these limits, because the CLI takes neither limitation into account.

In addition to demonstrating how to run PHP scripts from the shell with CLI, Jason also walks through the process of running Zend Framework-integrated CLI scripts in conjunction with an existing Zend Framework-driven website.


Read the full story at PHPBuilder:
Running PHP and Zend Framework Scripts from the Command Line

Originally published on https://www.developer.com.

This article was originally published on January 5, 2011

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date