The main focus of CLI SAPI is for developing shell applications with PHP. However, you may want to create some applications which could be run, at the same time, using CLI and another SAPI (eg: web server). To detect CLI, you can use this function: Let’s say we want to create a simple application which... » read more
Things to check before upgrading to PHP 8 (I). Using count() on null (uncountable) parameter produces a fatal error.
PHP 8.0 produces a fatal error when passing "null" to "count()" function. You should definitely avoid it.