![]() But if you want to save them to a database or similar data store, then you can define scalar values for cases.Įnums with scalar equivalents for cases are called backed enums. Type the case usage as if it already existed, then press Alt+Enter and choose Add enum case.īy default, enumerated cases are simple singleton objects. You can quickly create new cases with a quick-fix. PhpStorm will check the type and highlight violations in the editor window. ![]() PhpStorm will help you with autocompletion and let you know if anything doesn’t follow the language syntax.Įnums can be used as type declarations in parameters, return values, and class properties. Enumsĭeclare an enum using the keywords enum and case. One of the most significant and expected features will, of course, be enums. As is our tradition, we will start rolling out support for the new features early. The new version of the interpreter is expected to be released in late November. We encourage you to create a ticket if you find a use case that we have not covered.
0 Comments
Leave a Reply. |