Talk
Attributes in PHP 8: Metadata in the Language, Not in Docblocks
Duration
40m
This talk provides an overview of the "metadata in code" functionality introduced in PHP 8.0 and extended in PHP 8.1. These attributes replace the previously everyday use of docblocks for metadata configuration with a much better system in the core of the PHP language. With attributes, you can provide a machine-readable specification of code elements such as classes, properties, methods, arguments, and constants. We will discuss use cases, the implementation, and pitfalls you should avoid when using attributes.
About this talk
- Talk was presented at:
- better code 2020 (Remote / Video)