<commit_before><?php

/**
 * Initialize the whole program!
 */
class Init
{
    public function __construct()
    {
        // Reinitialize root directory
        // TODO: Not good for 'views' on some file systems & OS
        define('ROOT', dirname(__DIR__) . DIRECTORY_SEPARATOR);

        // checking for minimum PHP version
        if (version_compare(PHP_VERSION, '5.3.7', '<') AND version_compare(PHP_VERSION, '5.6.23', '>')) {
            exit("Sorry, This system does not run on a PHP version smaller than 5.3.7 and still unstable in ".PHP_VERSION);
        } else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
            // if you are using PHP 5.3 or PHP 5.4 you have to include the password_api_compatibility_library.php
            // (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
            require_once(ROOT . "libraries/password_compatibility_library.php");
        } else {
            // The Composer auto-loader (official way to load Composer contents) to load external stuff automatically
            $lib = ROOT.'vendor/autoload.php';
            $config = ROOT.'config.php';
            if (file_exists($lib)) {
                require $lib;
                if (!file_exists($config)) {
                    exit("File " . $config . " might be corrupted or missing.<br />Create a copy with config.php.example. ");
                } else {
                    require ROOT.'config.php';
                }
            } else {<commit_msg>Bugfixes, and new  PHP7 version compare<commit_after><?php

/**
 * Initialize the whole program!
 */
class Init
{
    public function __construct()
    {
        // Reinitialize root directory
        // TODO: Not good for 'views' on some file systems & OS
        define('ROOT', dirname(__DIR__) . DIRECTORY_SEPARATOR);

        // checking for minimum PHP version
        if (version_compare(PHP_VERSION, '5.3.7', '<') AND version_compare(PHP_VERSION, '7', '>')) {
            exit("Sorry, This system does not run on a PHP version smaller than 5.3.7 and still unstable in ".PHP_VERSION);
        } else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
            // if you are using PHP 5.3 or PHP 5.4 you have to include the password_api_compatibility_library.php
            // (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
            require_once(ROOT . "libraries/php5/password_compatibility_library.php");
        } else {
            // The Composer auto-loader (official way to load Composer contents) to load external stuff automatically
            $lib = ROOT.'vendor/autoload.php';
            $config = ROOT.'config.php';
            if (file_exists($lib)) {
                require $lib;
                if (!file_exists($config)) {
                    //TODO: Bypass config and use default values instead then give a error feedback
                    exit("File " . $config . " might be corrupted or missing.<br />Please create config.php manually with config.php.example. ");
                } else {
                    require ROOT.'config.php';
                }
            } else {
{'fraction_non_alphanumeric': 0.10680228862047043, 'fraction_numerical': 0.011760966306420852, 'mean_word_length': 2.0642648490749758, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4353994', 'n_tokens_mistral': 854, 'n_tokens_neox': 821, 'n_words': 281}