xref: /plugin/combo/vendor/symfony/polyfill-php80/bootstrap.php (revision 04fd306c7c155fa133ebb3669986875d65988276)
1*04fd306cSNickeau<?php
2*04fd306cSNickeau
3*04fd306cSNickeau/*
4*04fd306cSNickeau * This file is part of the Symfony package.
5*04fd306cSNickeau *
6*04fd306cSNickeau * (c) Fabien Potencier <fabien@symfony.com>
7*04fd306cSNickeau *
8*04fd306cSNickeau * For the full copyright and license information, please view the LICENSE
9*04fd306cSNickeau * file that was distributed with this source code.
10*04fd306cSNickeau */
11*04fd306cSNickeau
12*04fd306cSNickeauuse Symfony\Polyfill\Php80 as p;
13*04fd306cSNickeau
14*04fd306cSNickeauif (\PHP_VERSION_ID >= 80000) {
15*04fd306cSNickeau    return;
16*04fd306cSNickeau}
17*04fd306cSNickeau
18*04fd306cSNickeauif (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
19*04fd306cSNickeau    define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
20*04fd306cSNickeau}
21*04fd306cSNickeau
22*04fd306cSNickeauif (!function_exists('fdiv')) {
23*04fd306cSNickeau    function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
24*04fd306cSNickeau}
25*04fd306cSNickeauif (!function_exists('preg_last_error_msg')) {
26*04fd306cSNickeau    function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
27*04fd306cSNickeau}
28*04fd306cSNickeauif (!function_exists('str_contains')) {
29*04fd306cSNickeau    function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
30*04fd306cSNickeau}
31*04fd306cSNickeauif (!function_exists('str_starts_with')) {
32*04fd306cSNickeau    function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
33*04fd306cSNickeau}
34*04fd306cSNickeauif (!function_exists('str_ends_with')) {
35*04fd306cSNickeau    function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
36*04fd306cSNickeau}
37*04fd306cSNickeauif (!function_exists('get_debug_type')) {
38*04fd306cSNickeau    function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
39*04fd306cSNickeau}
40*04fd306cSNickeauif (!function_exists('get_resource_id')) {
41*04fd306cSNickeau    function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
42*04fd306cSNickeau}
43