Any programmers here who've used PHP to build command line tools in PHP? What is the experience like compared to, let's say Python or node.js? How good are the facilities? What are the limitations?
It's really good. Using the Symfony Console component you get sane argument and option parsing and validation (optional/required, single or array values), output styling, interactive inputs, tables etc.
If you're wanting to build a TUI I haven't seen any libraries as advanced as the Python or JS ones.
I tried to write a CLI tool for orchestration by wrapping some sub-processes. I found PHP very limited in its ability to handle subprocesses (streams, error handling, signal forwarding). I tried to avoid using frameworks, but eventually used Symfony's "Process" lib. It helped with Linux but Windows support is very limited.
This experience was pretty disappointing, but also pretty niche. Overall I agree with the general sentiment that PHP is very nice to use nowadays, especially for web development.