What are design patterns in PHP?

Design patterns are recurring solutions to common problems in software designing.

It is recommend to acknowledge the following principles before starting with design patterns. Without the strict following of this principles design patterns (and OOP in general) makes no sense.

Types of design patterns

According to the Gang of Four book we can categorize design patterns into three main categories:

Creational design patterns

Structural design patterns

Behavioral design patterns

Other design patterns

Other design patterns that are important to know for complex applications:

See also

GitHub OctocatFound a typo? Something wrong with this content? Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all the contributors.