is_cli()
Returns: | TRUE if currently running under CLI, FALSE otherwise |
---|---|
Return type: | bool |
Returns TRUE if the application is run through the command line and FALSE if not.
Note
This function checks both if the PHP_SAPI
value is ‘cli’ or if the STDIN
constant is defined.
Please login to continue.