~/talk

PHP Enums

Talkat Dutch PHP Conference 2021 · 2021-06-17..06-18· [php]
links:none on file
slides:none on file

PHP 8.1 introduces true enumerated types that replace magic constants with a strict type you can use as parameter, return and property types; two flavors exist: unit enums (no values) and backed enums (string or int values) with automatic .name and .value, static and instance methods, cases() to list members and from/tryFrom to convert DB or API values back; enums are final (no extension), disallow properties, require PHP 8.1 and Composer 2.1 for autoloading, and require adapters for ORMs like Doctrine when persisting.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26PHP Enums
  3. 2:38Topics
  4. 3:14curl request
  5. 4:28curl setup
  6. 8:40typescript
  7. 13:46PHP 81
  8. 28:40Usage Examples
  9. 31:57Backwards Compatibility
  10. 34:10Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.