bootstrap.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use Symfony\Polyfill\Php72 as p;
  11. if (PHP_VERSION_ID < 70200) {
  12. if ('\\' === DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
  13. function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
  14. }
  15. if (!function_exists('stream_isatty')) {
  16. function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
  17. }
  18. if (!function_exists('utf8_encode')) {
  19. function utf8_encode($s) { return p\Php72::utf8_encode($s); }
  20. function utf8_decode($s) { return p\Php72::utf8_decode($s); }
  21. }
  22. if (!function_exists('spl_object_id')) {
  23. function spl_object_id($s) { return p\Php72::spl_object_id($s); }
  24. }
  25. if (!defined('PHP_OS_FAMILY')) {
  26. define('PHP_OS_FAMILY', p\Php72::php_os_family());
  27. }
  28. if (!function_exists('mb_chr')) {
  29. function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); }
  30. function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); }
  31. function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
  32. }
  33. }