I kinda meant both. I feel silly not knowing that it's only "php ./script.php".
I also meant long-running processes, which it sounds like is still problematic. To be fair, it doesn't sound like PHP was ever designed to be used for long-running processes, to which I guess "Fair enough", but that might make things like a job worker queue more complicated if you want to write the workers in PHP (it sounds like you'll need a dispatcher in a different language because that would be a long-running process).
This article is from 2013 and is not relevant anymore. Dozens of concepts useful even for writing desktop apps with PHP (I don't claim that it is the best choice) were presented in book "PHP Beyond the Web".
Not saying it's not possible: from where I am in 2020, long-lived PHP 7.4 processes still exhibit the described symptoms (memory leaks, even segfaults). In other words, tools for the job.
I also meant long-running processes, which it sounds like is still problematic. To be fair, it doesn't sound like PHP was ever designed to be used for long-running processes, to which I guess "Fair enough", but that might make things like a job worker queue more complicated if you want to write the workers in PHP (it sounds like you'll need a dispatcher in a different language because that would be a long-running process).