require_once 'CRM/Core/Config.php'; $config = CRM_Core_Config::singleton(); if ($config->isUpgradeMode()) { echo "System is in upgrade mode"; } else { echo "System is not in upgrade mode"; }This example checks if the system is in upgarde mode or not using isUpgradeMode() method and echoes the appropriate message. Package library: This class is a part of the CRM_Core package of the PHP CRM software.