Before the advent of Enums in PHP, we had numerous ways of representing enum-like data. Like many aspects of PHP, how the Enums have been implemented to replace those old methods can vary widely based on the developer and the application in question. In this session, we will dive into the ways Enums have been adopted - the good, the bad, and the ugly. We'll talk about readability and data storage as well as diving into methods for refactoring. This will be an interactive session and I encourage all attendees to share their experiences as we go.

Comments

Please login to leave a comment

Great job!

I use enums heavily for rest API validation (and API doc generation)

Brian Fenton at 10:57 on 20 May 2025

I was sitting in the back (looking for an outlet, not your fault) but the font size was a little small in many of the slides. Good content though. I hadn't considered the some of the techniques late in the slide, I took away some new ideas. I can't wait for us to upgrade to 8.4 for property hooks 👍🏻

Good technical dive into Enums. The examples were great at demonstrating techniques and reasons for using Enums. I have concrete takeaways to go implement in my coding because of the use cases covered. Great talk Dana!

This was a great talk, and well put together. The flows between some other new features in PHP, such as property hooks was also a useful thing to see.

My only annoyance was the use of ligatures in code examples.

Andrew Woods at 14:14 on 21 May 2025

Great job! I enjoyed seeing a deeper presentation on the use of Enums. Dana has a great speaking style.