You are here

function performance_is_cli in Performance Logging and Monitoring 6

Same name and namespace in other branches
  1. 6.2 performance.module \performance_is_cli()

Drupal 7 backport of drupal_is_cli(). http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupa...

1 call to performance_is_cli()
performance_shutdown in ./performance.module
Shutdown function that collects all performance data.

File

./performance.module, line 1261
Logs detailed and/or summary page generation time and memory consumption for page requests. Copyright Khalid Baheyeldin 2008 of http://2bits.com

Code

function performance_is_cli() {
  return !isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0);
}