~/talk

Monads in PHP

Talkat Laracon EU 2017 · on Tuesday, 2017-08-29· [php]
slides:none on file

Claims that monads are ordinary datatypes and shows working PHP prototypes that make null checks and nested loops disappear: implements Maybe (Optional) with create then value and a Many (List) with flat‑map style then, shares behavior via a trait (a reusable within) and adds shortcuts like a magic __get, refactors brittle store->address->city code into safe chained calls, and ties the idea to real tools — promises, jQuery chaining, and Eloquent — all demonstrated running.

AI-written summary · about

  1. 0:00Start
  2. 3:45Rules
  3. 4:31ArrayStack
  4. 7:36Stack Size Method
  5. 10:40Operations
  6. 11:28ArrayCollection
  7. 12:07RangeCollection
  8. 13:03Collection Filter Method
  9. 18:22Handling null
  10. 25:41Handling many
  11. 31:53Similar things
  12. 34:32Monad Within Method
~/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.