Debian Codegraph @

vendor/symfony/polyfill-php85/bootstrap.php

raw
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 use Symfony\Polyfill\Php85 as p;
13
14 if (\PHP_VERSION_ID >= 80500) {
15 return;
16 }
17
18 if (!function_exists('get_error_handler')) {
19 function get_error_handler(): ?callable { return p\Php85::get_error_handler(); }
20 }
21
22 if (!function_exists('get_exception_handler')) {
23 function get_exception_handler(): ?callable { return p\Php85::get_exception_handler(); }
24 }
25
26 if (!function_exists('array_first')) {
27 function array_first(array $array) { return p\Php85::array_first($array); }
28 }
29
30 if (!function_exists('array_last')) {
31 function array_last(array $array) { return p\Php85::array_last($array); }
32 }
33
34 if (extension_loaded('intl') && !function_exists('locale_is_right_to_left')) {
35 function locale_is_right_to_left(string $locale): bool { return p\Php85::locale_is_right_to_left($locale); }
36 }
37
38 if (\PHP_VERSION_ID >= 80000) {
39 require __DIR__.'/bootstrap80.php';
40
41 return;
42 }
43
44 if (extension_loaded('intl') && !function_exists('grapheme_levenshtein')) {
45 function grapheme_levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1, string $locale = '') { return p\Php85::grapheme_levenshtein($string1, $string2, $insertion_cost, $replacement_cost, $deletion_cost); }
46 }