Talk in English - US at Cascadia PHP
View Slides: https://ian.im/pcntl18
Checkout the code: https://github.com/iansltx/pcntl-demo
Checkout the code: https://github.com/iansltx/raphple/commit/b8249a15fac5c49d86640af720887e6ef97154ef?w=1
Short URL: https://joind.in/talk/ac687 (QR-Code (opens in new window))
PHP's process control (pcntl) extension provides a set of highly underrated tools for scripts invoked at the command line, exposing behaviors that you might have thought only existed for compiled applications, such as forking and signal handling. We'll dive into these behaviors, including fun diversions like making a process zombie that rises from the dead when you hit Ctrl-C, and a parallel utility that uses multiple processes to get things done faster. We'll also take a look at Symfony's Process component that can be used to execute additional command lines safely and asynchronously, whether you need to run those commands from a web cotext or a CLI.