symfony / polyfill

PHP polyfills

Home Page:https://symfony.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.1 - enum_exists

stof opened this issue · comments

In order to simplify code checking for class existence for any kind of PHP classes (actual classes, interfaces, traits and now enums), it might be great to provide a polyfill for the enum_exists function.
The implementation would be quite straightforward: return false; as enums cannot exist on older versions.