by Ourgon · 4y ago · 0 comments
It is possible to use PHP for CLI apps as well but this is a bit of an afterthought:
if (PHP_SAPI == "cli") {
# CLI-code goes here
exit();
}
It is the right tool for a lot of jobs - not for all jobs but what language is?The language at hand is often the best language for the job, just like that phone camera in your pocket is the best camera to snap that shot of whatever event you just happened upon. Sure, it would have been better if you could use a DSLR on a stand, shooting raw to be processed in some fancy tool but that DSLR and stand and tool generally complicate matters far more than they add in quality. Sometimes this is worth it, often it is not.