mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-29 17:44:52 +08:00
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
435 B
435 B
Traits
Traits are a mechanism for code reuse in single-inheritance languages like PHP. A trait defines methods that can be inserted into any class using the use keyword. A class can use multiple traits simultaneously. Traits are useful for sharing behavior across classes that don't share a common parent.
Visit the following resources to learn more: