© 2016


Create Command Line Interface Scripts with PHP


Table of contents

  1. Front Matter
    Pages i-xiii
  2. Rob Aley
    Pages 1-5
  3. Rob Aley
    Pages 31-40
  4. Rob Aley
    Pages 41-44
  5. Back Matter
    Pages 47-62

About this book


This concise book shows you how to create PHP Command Line Interface (CLI) scripts, including user interaction and scripts to automate and assist your workflow. Learn to quickly create useful and effective Command Line software and scripts using the world's most popular web scripting language, PHP. Enjoy the benefits of writing CLI scripts in PHP: Save money by redeploying existing skills, not learning new ones. Save time and increase productivity by using a high-level language. Make money by providing your clients with a full-stack service.

With PHP CLI readers will:

  • Learn about the PHP CLI SAPI
  • Discover how to use it to run PHP scripts off-line
  • Easily deal with user input and console output
  • Work with helper libraries and software
  • Find out the differences between programming for the web and for the CLI


php cli command line interface web development scripting

Authors and affiliations

  1. 1.OxfordUnited Kingdom

About the authors

Rob Aley has been programming commercially and academically in a variety of programming languages, with over 10 years of PHP experience, since graduating in Computer Science from the University of Leeds in 1999. Having had a varied career working in industries from coffee to condoms, as well as doing freelance software development, Rob is now a “Database Programmer” at the University of Oxford working in healthcare related data analysis. He uses PHP almost exclusively now, out of choice. When he's not working or writing books, he spends time with his wife, three young children, and most importantly his cat.

Bibliographic information