enums in codeigniter 4 ? |
I need to create enums on codeigniter 4.3.7 site (not in database) for passing enum as parameter to custom function...
In which way can I do ? Thanks in advance!
Use PHP 8.1 or later.
Create an ENUM file and put it in somewhere where PSR-4 autoloader can autoload. https://www.php.net/manual/en/language.e...basics.php
(10-03-2023, 12:29 AM)kenjis Wrote: Use PHP 8.1 or later. Any possible decision for php 8.0 ?
Enum is the new feature in PHP 8.1.
https://www.php.net/manual/en/migration8...core.enums You cannot use it with PHP 8.0.
(10-03-2023, 01:30 AM)kenjis Wrote: Enum is the new feature in PHP 8.1.Some external libraries supporting 8.0 too ?
How to Use Enums in PHP 8
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |