Resources
1 year ago
Php80.php
1 year ago
PhpToken.php
1 year ago
bootstrap.php
4 years ago
index.php
3 years ago
bootstrap.php
52 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | use MailPoetVendor\Symfony\Polyfill\Php80 as p; |
| 4 | if (\PHP_VERSION_ID >= 80000) { |
| 5 | return; |
| 6 | } |
| 7 | if (!\defined('FILTER_VALIDATE_BOOL') && \defined('FILTER_VALIDATE_BOOLEAN')) { |
| 8 | \define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); |
| 9 | } |
| 10 | if (!\function_exists('fdiv')) { |
| 11 | function fdiv(float $num1, float $num2) : float |
| 12 | { |
| 13 | return p\Php80::fdiv($num1, $num2); |
| 14 | } |
| 15 | } |
| 16 | if (!\function_exists('preg_last_error_msg')) { |
| 17 | function preg_last_error_msg() : string |
| 18 | { |
| 19 | return p\Php80::preg_last_error_msg(); |
| 20 | } |
| 21 | } |
| 22 | if (!\function_exists('str_contains')) { |
| 23 | function str_contains(?string $haystack, ?string $needle) : bool |
| 24 | { |
| 25 | return p\Php80::str_contains($haystack ?? '', $needle ?? ''); |
| 26 | } |
| 27 | } |
| 28 | if (!\function_exists('str_starts_with')) { |
| 29 | function str_starts_with(?string $haystack, ?string $needle) : bool |
| 30 | { |
| 31 | return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); |
| 32 | } |
| 33 | } |
| 34 | if (!\function_exists('str_ends_with')) { |
| 35 | function str_ends_with(?string $haystack, ?string $needle) : bool |
| 36 | { |
| 37 | return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); |
| 38 | } |
| 39 | } |
| 40 | if (!\function_exists('get_debug_type')) { |
| 41 | function get_debug_type($value) : string |
| 42 | { |
| 43 | return p\Php80::get_debug_type($value); |
| 44 | } |
| 45 | } |
| 46 | if (!\function_exists('get_resource_id')) { |
| 47 | function get_resource_id($resource) : int |
| 48 | { |
| 49 | return p\Php80::get_resource_id($resource); |
| 50 | } |
| 51 | } |
| 52 |