<commit_before><?php defined('BOOTSTRAPPATH') OR exit('No direct script access allowed');

/**
 * A Custom Bootstrap File
 * @author <NAME> <<EMAIL>>, 2013
 * @license The MIT License, http://opensource.org/licenses/MIT
 */


/*
 * --------------------------------------------------------------------
 * Environment and request type detection
 * --------------------------------------------------------------------
 */

define('IS_PHP_5_1', version_compare(PHP_VERSION, '5.1.0', '>='));
define('IS_PHP_5_2', version_compare(PHP_VERSION, '5.2.0', '>='));
define('IS_PHP_5_3', version_compare(PHP_VERSION, '5.3.0', '>='));
define('IS_PHP_5_4', version_compare(PHP_VERSION, '5.4.0', '>='));
define('IS_PHP_5_5', version_compare(PHP_VERSION, '5.5.0', '>='));
define('IS_WINDOWS_OS', strtolower(substr(php_uname('s'), 0, 3 )) == 'win');
define('IS_CLI', (PHP_SAPI == 'cli') or defined('STDIN'));
define('IS_CLI_REQUEST', IS_CLI);   // Deprecated, use IS_CLI instead.
define('IS_AJAX_REQUEST', isset($_SERVER['HTTP_X_REQUESTED_WITH'])
    && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

// Fix $_SERVER['REQUEST_URI'] if it is missing.
if (!isset($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI'] == '') {
    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
    if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
        $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
    }
}


/*
 * --------------------------------------------------------------------
 * Essential functions to serve bootstrap process further
 * --------------------------------------------------------------------
 */

require BOOTSTRAPPATH.'resolve_path.php';
require BOOTSTRAPPATH.'merge_paths.php';
require BOOTSTRAPPATH.'detect_https.php';
require BOOTSTRAPPATH.'detect_host.php';
require BOOTSTRAPPATH.'detect_url.php';


/*
 * --------------------------------------------------------------------<commit_msg>Adding more constants for UTF-8 support detection, see https://github.com/EllisLab/CodeIgniter/issues/2792<commit_after><?php defined('BOOTSTRAPPATH') OR exit('No direct script access allowed');

/**
 * A Custom Bootstrap File
 * @author <NAME> <<EMAIL>>, 2013
 * @license The MIT License, http://opensource.org/licenses/MIT
 */


/*
 * --------------------------------------------------------------------
 * Environment and request type detection
 * --------------------------------------------------------------------
 */

define('IS_PHP_5_1', version_compare(PHP_VERSION, '5.1.0', '>='));
define('IS_PHP_5_2', version_compare(PHP_VERSION, '5.2.0', '>='));
define('IS_PHP_5_3', version_compare(PHP_VERSION, '5.3.0', '>='));
define('IS_PHP_5_4', version_compare(PHP_VERSION, '5.4.0', '>='));
define('IS_PHP_5_5', version_compare(PHP_VERSION, '5.5.0', '>='));
define('IS_WINDOWS_OS', strtolower(substr(php_uname('s'), 0, 3 )) == 'win');
define('IS_CLI', (PHP_SAPI == 'cli') or defined('STDIN'));
define('IS_CLI_REQUEST', IS_CLI);   // Deprecated, use IS_CLI instead.
define('IS_AJAX_REQUEST', isset($_SERVER['HTTP_X_REQUESTED_WITH'])
    && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

define('ICONV_INSTALLED', function_exists('iconv'));
define('MBSTRING_INSTALLED', function_exists('mb_strlen'));
define('PCRE_UTF8_INSTALLED', @preg_match('/./u', 'é') === 1);

// Fix $_SERVER['REQUEST_URI'] if it is missing.
if (!isset($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI'] == '') {
    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
    if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
        $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
    }
}


/*
 * --------------------------------------------------------------------
 * Essential functions to serve bootstrap process further
 * --------------------------------------------------------------------
 */

require BOOTSTRAPPATH.'resolve_path.php';
require BOOTSTRAPPATH.'merge_paths.php';
require BOOTSTRAPPATH.'detect_https.php';
require BOOTSTRAPPATH.'detect_host.php';
require BOOTSTRAPPATH.'detect_url.php';


/*
 * --------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.3325289575289575, 'fraction_numerical': 0.016650579150579152, 'mean_word_length': 2.5548885077186965, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '114047', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1225, 'n_words': 204}