<commit_before><?php
/*
* Laravel Requirements Checklist
*
* Verifies Laravel requirements
*
* For version 5.4:
* PHP >= 5.6.4
* OpenSSL PHP Extension
* PDO PHP Extension
* Mbstring PHP Extension
* Tokenizer PHP Extension
* XML PHP Extension
*
* optional:
* PDO_SQLite
*
* Author: <NAME> <<EMAIL>>
*/

define('LARAVEL_MIN_PHP_VERSION', '5.6.4');

?><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Laravel Requirements Checklist</title>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
    <div class="container">
        <div class="row">
            <h1>Laravel Requirements Checklist</h1>
        </div>

        <div class="row">
            <h3>PHP version</h3>
            <?php if (version_compare(PHP_VERSION, LARAVEL_MIN_PHP_VERSION) >= 0) { ?>
            <div class="alert alert-success" role="alert">
                The minimum PHP version supported is <?php echo LARAVEL_MIN_PHP_VERSION; ?>,
                this server is running version <?php echo PHP_VERSION; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                The minimum PHP version supported is <?php echo LARAVEL_MIN_PHP_VERSION ?>',
                this server is running version <?php echo PHP_VERSION; ?>
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>OpenSSL PHP Extension</h3>
            <?php if (OPENSSL_VERSION_TEXT) { ?>
            <div class="alert alert-success" role="alert">
                OpenSSL PHP extension available in version <?php echo str_replace('OpenSSL', '', OPENSSL_VERSION_TEXT); ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                OpenSSL PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>PDO PHP Extension</h3>
            <?php if ($pdo = phpversion('pdo')) { ?>
            <div class="alert alert-success" role="alert">
                PDO PHP extension available in version <?php echo $pdo; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                PDO PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>Mbstring PHP Extension</h3>
            <?php if ($mbstring = mb_get_info('internal_encoding')) { ?>
            <div class="alert alert-success" role="alert">
                Mbstring PHP extension available with internal encoding set to <?php echo $mbstring; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                Mbstring PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>Tokenizer PHP Extension</h3>
            <?php if ($tokenizer = phpversion('tokenizer')) { ?>
            <div class="alert alert-success" role="alert">
                Tokenizer PHP extension available in version <?php echo $tokenizer; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                Tokenizer PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>XML PHP Extension</h3>
            <?php if ($xml = phpversion('xml')) { ?>
            <div class="alert alert-success" role="alert">
                XML PHP extension available in version <?php echo $xml; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                XML PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h2>Optional extensions</h2>
        </div>

        <div class="row">
            <h3>PDO_SQLite PHP Extension <small>(necessary if you plan to use an SQLite database)</small></h3>
            <?php if ($pdo_sqlite = phpversion('pdo_sqlite')) { ?>
            <div class="alert alert-success" role="alert">
                PDO_SQLite PHP extension available in version <?php echo $pdo_sqlite; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                PDO_SQLite PHP extension not available.
            </div>
            <?php } ?>
        </div>
    </div>
</body><commit_msg>Added PHPinfo, improved XML version detection<commit_after><?php
/*
* Laravel Requirements Checklist
*
* Verifies Laravel requirements
*
* For version 5.4:
* PHP >= 5.6.4
* OpenSSL PHP Extension
* PDO PHP Extension
* Mbstring PHP Extension
* Tokenizer PHP Extension
* XML PHP Extension
*
* optional:
* PDO_SQLite
*
* Author: <NAME> <<EMAIL>>
*/

define('LARAVEL_MIN_PHP_VERSION', '5.6.4');

if (array_key_exists('extra', $_GET) && $_GET['extra'] == 'phpinfo') {
    phpinfo();
    die();
}

?><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Laravel Requirements Checklist</title>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
    <div class="container">
        <div class="row">
            <h1>Laravel Requirements Checklist</h1>
        </div>

        <div class="row">
            <h3>PHP version</h3>
            <?php if (version_compare(PHP_VERSION, LARAVEL_MIN_PHP_VERSION) >= 0) { ?>
            <div class="alert alert-success" role="alert">
                The minimum PHP version supported is <?php echo LARAVEL_MIN_PHP_VERSION; ?>,
                this server is running version <?php echo PHP_VERSION; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                The minimum PHP version supported is <?php echo LARAVEL_MIN_PHP_VERSION ?>',
                this server is running version <?php echo PHP_VERSION; ?>
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>OpenSSL PHP Extension</h3>
            <?php if (OPENSSL_VERSION_TEXT) { ?>
            <div class="alert alert-success" role="alert">
                OpenSSL PHP extension available in version <?php echo str_replace('OpenSSL', '', OPENSSL_VERSION_TEXT); ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                OpenSSL PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>PDO PHP Extension</h3>
            <?php if ($pdo = phpversion('pdo')) { ?>
            <div class="alert alert-success" role="alert">
                PDO PHP extension available in version <?php echo $pdo; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                PDO PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>Mbstring PHP Extension</h3>
            <?php if ($mbstring = mb_get_info('internal_encoding')) { ?>
            <div class="alert alert-success" role="alert">
                Mbstring PHP extension available with internal encoding set to <?php echo $mbstring; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                Mbstring PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>Tokenizer PHP Extension</h3>
            <?php if ($tokenizer = phpversion('tokenizer')) { ?>
            <div class="alert alert-success" role="alert">
                Tokenizer PHP extension available in version <?php echo $tokenizer; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                Tokenizer PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h3>XML PHP Extension</h3>
            <?php if (extension_loaded('xml')) { ?>
            <div class="alert alert-success" role="alert">
                XML PHP extension available
                <?php
                if ($xml = phpversion('xml')) {
                    echo ' in version ' . $xml;
                }
                ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                XML PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h2>Optional extensions</h2>
        </div>

        <div class="row">
            <h3>PDO_SQLite PHP Extension <small>(necessary if you plan to use an SQLite database)</small></h3>
            <?php if ($pdo_sqlite = phpversion('pdo_sqlite')) { ?>
            <div class="alert alert-success" role="alert">
                PDO_SQLite PHP extension available in version <?php echo $pdo_sqlite; ?>
            </div>
            <?php } else { ?>
            <div class="alert alert-warning" role="alert">
                PDO_SQLite PHP extension not available.
            </div>
            <?php } ?>
        </div>

        <div class="row">
            <h2>Extras</h2>
        </div>

        <div class="row">
            <ul class="list-group">
                  <li class="list-group-item"><a href="<?php echo basename($_SERVER['PHP_SELF']) ?>?extra=phpinfo">PHP info</a></li>
            </ul>
        </div>
    </div>
</body>
{'fraction_non_alphanumeric': 0.1408997955010225, 'fraction_numerical': 0.006748466257668712, 'mean_word_length': 1.775539160045403, 'pattern_counts': {'":': 0, '<': 242, '<?xml version=': 0, '>': 246, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, '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': '6367884', 'n_tokens_mistral': 2801, 'n_tokens_neox': 2700, 'n_words': 746}