Home > Article > Backend Development > 23 design patterns for PHP 1
This article introduces the 23 design patterns of PHP 1, which has certain reference value. Now I share it with you. Friends in need can refer to it
1. Design Patterns Classification
Generally speaking, design patterns are divided into three categories:
Creative patterns, a total of five types: factory method pattern, abstract factory pattern, singleton pattern, builder pattern, prototype pattern .
There are seven structural modes: adapter mode, decorator mode, proxy mode, appearance mode, bridge mode, combination mode, and flyweight mode.
Behavioral patterns, eleven in total: strategy pattern, template method pattern, observer pattern, iterative sub-pattern, chain of responsibility pattern, command pattern, memo pattern, state pattern, visitor pattern, intermediary pattern , interpreter mode.
In fact, there are two categories: concurrent mode and thread pool mode
The above is the detailed content of 23 design patterns for PHP 1. For more information, please follow other related articles on the PHP Chinese website!