Subversion Repositories oidplus

Rev

Rev 1384 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
827 daniel-mar 1
<?php
2
 
3
/**
4
 * Bootstrapping File for phpseclib
5
 *
6
 * composer isn't a requirement for phpseclib 2.0 but this file isn't really required
7
 * either. it's a bonus for those using composer but if you're not phpseclib will
8
 * still work
9
 *
10
 * @license http://www.opensource.org/licenses/mit-license.html MIT License
11
 */
12
 
13
if (extension_loaded('mbstring')) {
14
    // 2 - MB_OVERLOAD_STRING
15
    // mbstring.func_overload is deprecated in php 7.2 and removed in php 8.0.
16
    if (version_compare(PHP_VERSION, '8.0.0') < 0 && ini_get('mbstring.func_overload') & 2) {
17
        throw new UnexpectedValueException(
18
            'Overloading of string functions using mbstring.func_overload ' .
19
            'is not supported by phpseclib.'
20
        );
21
    }
1411 daniel-mar 22
}