Skip to content

Commit 09445ec

Browse files
[PHP 8.1] add enum_exists()
1 parent 00dedc6 commit 09445ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
if (!function_exists('array_is_list')) {
1919
function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
2020
}
21+
22+
if (!function_exists('enum_exists')) {
23+
function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
24+
}

0 commit comments

Comments
 (0)