Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

孙龙 / note-library

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Find file
Normal viewHistoryPermalink
Switch branch/tag
  • note-library
  • vendor
  • symfony
  • polyfill-php72
  • bootstrap.php
bootstrap.php 1.92 KB
孙龙's avatar
init
1f46a6ed
 
孙龙 committed 5 years ago
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Php72 as p;

if (PHP_VERSION_ID < 70200) {
孙龙's avatar
up
e6c192c5
 
孙龙 committed 5 years ago
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
    if (!defined('PHP_FLOAT_DIG')) {
        define('PHP_FLOAT_DIG', 15);
    }
    if (!defined('PHP_FLOAT_EPSILON')) {
        define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
    }
    if (!defined('PHP_FLOAT_MIN')) {
        define('PHP_FLOAT_MIN', 2.2250738585072E-308);
    }
    if (!defined('PHP_FLOAT_MAX')) {
        define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
    }
    if (!defined('PHP_OS_FAMILY')) {
        define('PHP_OS_FAMILY', p\Php72::php_os_family());
    }

孙龙's avatar
init
1f46a6ed
 
孙龙 committed 5 years ago
31 32 33 34 35 36 37 38
    if ('\\' === DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
        function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
    }
    if (!function_exists('stream_isatty')) {
        function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
    }
    if (!function_exists('utf8_encode')) {
        function utf8_encode($s) { return p\Php72::utf8_encode($s); }
孙龙's avatar
up
e6c192c5
 
孙龙 committed 5 years ago
39 40
    }
    if (!function_exists('utf8_decode')) {
孙龙's avatar
init
1f46a6ed
 
孙龙 committed 5 years ago
41 42 43 44 45
        function utf8_decode($s) { return p\Php72::utf8_decode($s); }
    }
    if (!function_exists('spl_object_id')) {
        function spl_object_id($s) { return p\Php72::spl_object_id($s); }
    }
孙龙's avatar
up
e6c192c5
 
孙龙 committed 5 years ago
46 47
    if (!function_exists('mb_ord')) {
        function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); }
孙龙's avatar
init
1f46a6ed
 
孙龙 committed 5 years ago
48 49 50
    }
    if (!function_exists('mb_chr')) {
        function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); }
孙龙's avatar
up
e6c192c5
 
孙龙 committed 5 years ago
51 52
    }
    if (!function_exists('mb_scrub')) {
孙龙's avatar
init
1f46a6ed
 
孙龙 committed 5 years ago
53 54 55
        function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
    }
}