bootstrap.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. return;
  13. }
  14. if (!defined('PHP_FLOAT_DIG')) {
  15. define('PHP_FLOAT_DIG', 15);
  16. }
  17. if (!defined('PHP_FLOAT_EPSILON')) {
  18. define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
  19. }
  20. if (!defined('PHP_FLOAT_MIN')) {
  21. define('PHP_FLOAT_MIN', 2.2250738585072E-308);
  22. }
  23. if (!defined('PHP_FLOAT_MAX')) {
  24. define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
  25. }
  26. if (!defined('PHP_OS_FAMILY')) {
  27. define('PHP_OS_FAMILY', p\Php72::php_os_family());
  28. }
  29. if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
  30. function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
  31. }
  32. if (!function_exists('stream_isatty')) {
  33. function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
  34. }
  35. if (!function_exists('utf8_encode')) {
  36. function utf8_encode($string) { return p\Php72::utf8_encode($string); }
  37. }
  38. if (!function_exists('utf8_decode')) {
  39. function utf8_decode($string) { return p\Php72::utf8_decode($string); }
  40. }
  41. if (!function_exists('spl_object_id')) {
  42. function spl_object_id($object) { return p\Php72::spl_object_id($object); }
  43. }
  44. if (!function_exists('mb_ord')) {
  45. function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); }
  46. }
  47. if (!function_exists('mb_chr')) {
  48. function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); }
  49. }
  50. if (!function_exists('mb_scrub')) {
  51. function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
  52. }