Brent 5/30/2022

My PHP enum style guide

Read Original

This article presents the author's opinionated style guide for using enums in PHP. It details rules for using uppercase notation for enum cases, advises against overusing backed enums unless necessary for serialization, and allows for simple match methods within enums to provide richer functionality.

My PHP enum style guide

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser