bootstrap.php 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\Php86 as p;
  11. if (\PHP_VERSION_ID >= 80600) {
  12. return;
  13. }
  14. if (!defined('ARRAY_FILTER_USE_VALUE')) {
  15. define('ARRAY_FILTER_USE_VALUE', 0);
  16. }
  17. if (\PHP_VERSION_ID >= 80000) {
  18. return require __DIR__.'/bootstrap80.php';
  19. }
  20. if (!function_exists('clamp')) {
  21. /**
  22. * @template V
  23. * @template L
  24. * @template H
  25. *
  26. * @param V $value
  27. * @param L $min
  28. * @param H $max
  29. *
  30. * @return V|L|H
  31. */
  32. function clamp($value, $min, $max) { return p\Php86::clamp($value, $min, $max); }
  33. }
  34. if (extension_loaded('intl') && !function_exists('grapheme_strrev')) {
  35. function grapheme_strrev(string $string) { return p\Php86::grapheme_strrev($string); }
  36. }