~/talk

PHP Generics Today (almost)

Talkat PHP UK Conference 2020 · 2020-02-19..02-21· [php, typescript]
slides:none on file

Claim: generics add real static guarantees to PHP when combined with Psalm and PHP Stan; demo builds a generic-like Queue using docblock template annotations plus runtime type checks to catch bad inserts and let static analyzers validate callers. Result: static analysis finds many type errors early, but IDEs lack full support and language-level runtime checks remain absent, so the approach mostly works today with caveats for third-party libraries and legacy code.

AI-written summary · about

  1. 0:00Start
  2. 2:59Static Analysis
  3. 7:53Pros and Cons
  4. 9:42Possible Solutions
  5. 14:40Collections
  6. 22:00Extend Templates
  7. 24:07Restrict Types
  8. 29:01Installing Sam
  9. 35:11Summary
  10. 38:48The Syntax of Generics
  11. 39:24Abstract Syntax Tree
  12. 41:57Major Benefits of Php
~/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.