What are design patterns in PHP?

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

It is recommend to acknowledge the following principles before starting with design patterns. Design patterns and OOP in general won't make sense without strictly following these principles.

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



Found 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 contributors.