Debian Codegraph @

vendor/symfony/polyfill-php84/bootstrap80.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\Php84 as p;
13
14 if (extension_loaded('mbstring')) {
15 if (!function_exists('mb_ucfirst')) {
16 function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Php84::mb_ucfirst($string, $encoding); }
17 }
18
19 if (!function_exists('mb_lcfirst')) {
20 function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Php84::mb_lcfirst($string, $encoding); }
21 }
22
23 if (!function_exists('mb_trim')) {
24 function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Php84::mb_trim($string, $characters, $encoding); }
25 }
26
27 if (!function_exists('mb_ltrim')) {
28 function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Php84::mb_ltrim($string, $characters, $encoding); }
29 }
30
31 if (!function_exists('mb_rtrim')) {
32 function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Php84::mb_rtrim($string, $characters, $encoding); }
33 }
34 }
35
36 if (extension_loaded('bcmath')) {
37 if (!function_exists('bcceil')) {
38 function bcceil(string $num): string { return p\Php84::bcceil($num); }
39 }
40 if (!function_exists('bcdivmod')) {
41 function bcdivmod(string $num1, string $num2, ?int $scale = null): ?array { return p\Php84::bcdivmod($num1, $num2, $scale); }
42 }
43 if (!function_exists('bcfloor')) {
44 function bcfloor(string $num): string { return p\Php84::bcfloor($num); }
45 }
46 if (!function_exists('bcround')) {
47 function bcround(string $num, int $precision = 0, $mode = RoundingMode::HalfAwayFromZero): string { return p\Php84::bcround($num, $precision, $mode); }
48 }
49 }
50
51 if (\PHP_VERSION_ID >= 80200) {
52 return require __DIR__.'/bootstrap82.php';
53 }
54
55 if (extension_loaded('intl') && !function_exists('grapheme_str_split')) {
56 function grapheme_str_split(string $string, int $length = 1) { return p\Php84::grapheme_str_split($string, $length); }
57 }