<commit_before><?php

if (PHP_MAJOR_VERSION === 5) {
    if (PHP_MINOR_VERSION < 6) {
        throw new \Exception('MadelineProto requires at least PHP 5.6 to run');
    }
    $newline = PHP_EOL;
    if (php_sapi_name() !== 'cli') $newline = '<br>'.$newline;
    echo "**********************************************************************$newline";
    echo "**********************************************************************$newline$newline";
    echo "YOU ARE USING AN OLD AND BUGGED VERSION OF PHP, PLEASE UPDATE TO PHP 7$newline";
    echo "PHP 5 USERS WILL NOT RECEIVE MADELINEPROTO UPDATES AND BUGFIXES$newline$newline";
    echo "SUPPORTED VERSIONS: PHP 7.0, 7.1, 7.2, 7.3+$newline";
    echo "RECOMMENDED VERSION: PHP 7.3$newline$newline";
    echo "**********************************************************************$newline";
    echo "**********************************************************************$newline";
    unset($newline);
}

function ___install_madeline()
{
    if (count(debug_backtrace(0)) === 1) {
        die('You must include this file in another PHP script'.PHP_EOL);
    }

    // MTProxy update
    $file = debug_backtrace(0, 1)[0]['file'];
    if (file_exists($file)) {
        $contents = file_get_contents($file);

        if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) {
            file_put_contents($file, $mtproxyd);

            return;
        }
    }

    // MadelineProto update
    $release_template = 'https://phar.madelineproto.xyz/release%s?v=new';
    $phar_template = 'https://phar.madelineproto.xyz/madeline%s.phar?v=new';

    $release_branch = defined('MADELINE_BRANCH') ? '-'.MADELINE_BRANCH : '-old';
    $release_default = '';

    if (PHP_MAJOR_VERSION === 5) {
        $release_branch = '5'.$release_branch;
        $release_default = '5';
    }

    if (!($release = @file_get_contents(sprintf($release_template, $release_branch)))) {
        if (!($release = @file_get_contents(sprintf($release_template, $release_default)))) {
            return;
        }
        $release_branch = $release_default;
    }

    if (!file_exists('madeline.phar') || !file_exists('madeline.phar.version') || file_get_contents('madeline.phar.version') !== $release) {
        $phar = file_get_contents(sprintf($phar_template, $release_branch));
<commit_msg>Use branch master if release is manually set to an empty string<commit_after><?php

if (PHP_MAJOR_VERSION === 5) {
    if (PHP_MINOR_VERSION < 6) {
        throw new \Exception('MadelineProto requires at least PHP 5.6 to run');
    }
    $newline = PHP_EOL;
    if (php_sapi_name() !== 'cli') $newline = '<br>'.$newline;
    echo "**********************************************************************$newline";
    echo "**********************************************************************$newline$newline";
    echo "YOU ARE USING AN OLD AND BUGGED VERSION OF PHP, PLEASE UPDATE TO PHP 7$newline";
    echo "PHP 5 USERS WILL NOT RECEIVE MADELINEPROTO UPDATES AND BUGFIXES$newline$newline";
    echo "SUPPORTED VERSIONS: PHP 7.0, 7.1, 7.2, 7.3+$newline";
    echo "RECOMMENDED VERSION: PHP 7.3$newline$newline";
    echo "**********************************************************************$newline";
    echo "**********************************************************************$newline";
    unset($newline);
}

function ___install_madeline()
{
    if (count(debug_backtrace(0)) === 1) {
        die('You must include this file in another PHP script'.PHP_EOL);
    }

    // MTProxy update
    $file = debug_backtrace(0, 1)[0]['file'];
    if (file_exists($file)) {
        $contents = file_get_contents($file);

        if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) {
            file_put_contents($file, $mtproxyd);

            return;
        }
    }

    // MadelineProto update
    $release_template = 'https://phar.madelineproto.xyz/release%s?v=new';
    $phar_template = 'https://phar.madelineproto.xyz/madeline%s.phar?v=new';

    $release_branch = defined('MADELINE_BRANCH') ? '-'.MADELINE_BRANCH : '-old';
    if ($release_branch === '-') $release_branch = '';
    $release_default = '';

    if (PHP_MAJOR_VERSION === 5) {
        $release_branch = '5'.$release_branch;
        $release_default = '5';
    }

    if (!($release = @file_get_contents(sprintf($release_template, $release_branch)))) {
        if (!($release = @file_get_contents(sprintf($release_template, $release_default)))) {
            return;
        }
        $release_branch = $release_default;
    }

    if (!file_exists('madeline.phar') || !file_exists('madeline.phar.version') || file_get_contents('madeline.phar.version') !== $release) {
        $phar = file_get_contents(sprintf($phar_template, $release_branch));

{'fraction_non_alphanumeric': 0.2402059959536509, 'fraction_numerical': 0.023910244620194962, 'mean_word_length': 4.310546875, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 10, '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': '6103365', 'n_tokens_mistral': 1862, 'n_tokens_neox': 1753, 'n_words': 304}