Signaling PHP by Cal Evans: Catching Signals in PHP CLI Scripts

Cal Evans shows how to use operating system signals to correctly manage PHP CLI application. Great book for everyone.

Posted on November 17, 2013

WARNING: Please note that this article was published a long time ago. The information contained might be outdated.

Cover of Signaling PHP by Cal Evans

If you make a living out of PHP you probably aren't coding just for the web.

Sometimes we need to do complex things, like queries that generate huge reports, and the browser is not the best way to go. That's when we write scripts made to be run in a terminal.

Some of us just type php see-you-later.php at the command line and stay there waiting for the process to end. Others maybe use something like echo "I'm alive!\n"; to make sure the script is still doing something. Some times we need to stop the execution but we're too scared to press the CTRL+C combination because we just don't know where the script is going to stop!

Cal Evans in Signaling PHP shows us how to use signals in PHP CLI (Command Line Interface) applications to correctly stop execution of a running script and schedule and manage alarms. The book shows a different perspective on how to interact with PHP CLI scripts in a more clean and efficient way.

Signaling PHP is perfect for the busy guys. You won't need to go searching the PHP documentation or Google to understand how things work. Buy it, read it, and you'll be able to do a lot more than Cal Evans shows you.

You can buy the book via Leanpub or searching "Signaling PHP" on Amazon.