bootstrap.php
71 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | use MailPoetVendor\Symfony\Polyfill\Php72 as p; |
| 4 | if (\PHP_VERSION_ID >= 70200) { |
| 5 | return; |
| 6 | } |
| 7 | if (!\defined('PHP_FLOAT_DIG')) { |
| 8 | \define('PHP_FLOAT_DIG', 15); |
| 9 | } |
| 10 | if (!\defined('PHP_FLOAT_EPSILON')) { |
| 11 | \define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); |
| 12 | } |
| 13 | if (!\defined('PHP_FLOAT_MIN')) { |
| 14 | \define('PHP_FLOAT_MIN', 2.2250738585072E-308); |
| 15 | } |
| 16 | if (!\defined('PHP_FLOAT_MAX')) { |
| 17 | \define('PHP_FLOAT_MAX', 1.7976931348623157E+308); |
| 18 | } |
| 19 | if (!\defined('PHP_OS_FAMILY')) { |
| 20 | \define('PHP_OS_FAMILY', p\Php72::php_os_family()); |
| 21 | } |
| 22 | if ('\\' === \DIRECTORY_SEPARATOR && !\function_exists('sapi_windows_vt100_support')) { |
| 23 | function sapi_windows_vt100_support($stream, $enable = null) |
| 24 | { |
| 25 | return p\Php72::sapi_windows_vt100_support($stream, $enable); |
| 26 | } |
| 27 | } |
| 28 | if (!\function_exists('stream_isatty')) { |
| 29 | function stream_isatty($stream) |
| 30 | { |
| 31 | return p\Php72::stream_isatty($stream); |
| 32 | } |
| 33 | } |
| 34 | if (!\function_exists('utf8_encode')) { |
| 35 | function utf8_encode($string) |
| 36 | { |
| 37 | return p\Php72::utf8_encode($string); |
| 38 | } |
| 39 | } |
| 40 | if (!\function_exists('utf8_decode')) { |
| 41 | function utf8_decode($string) |
| 42 | { |
| 43 | return p\Php72::utf8_decode($string); |
| 44 | } |
| 45 | } |
| 46 | if (!\function_exists('spl_object_id')) { |
| 47 | function spl_object_id($object) |
| 48 | { |
| 49 | return p\Php72::spl_object_id($object); |
| 50 | } |
| 51 | } |
| 52 | if (!\function_exists('mb_ord')) { |
| 53 | function mb_ord($string, $encoding = null) |
| 54 | { |
| 55 | return p\Php72::mb_ord($string, $encoding); |
| 56 | } |
| 57 | } |
| 58 | if (!\function_exists('mb_chr')) { |
| 59 | function mb_chr($codepoint, $encoding = null) |
| 60 | { |
| 61 | return p\Php72::mb_chr($codepoint, $encoding); |
| 62 | } |
| 63 | } |
| 64 | if (!\function_exists('mb_scrub')) { |
| 65 | function mb_scrub($string, $encoding = null) |
| 66 | { |
| 67 | $encoding = null === $encoding ? \mb_internal_encoding() : $encoding; |
| 68 | return \mb_convert_encoding($string, $encoding, $encoding); |
| 69 | } |
| 70 | } |
| 71 |