Flyweight Design Pattern in PHP

Jakub Kapuscik
The Startup

--

Polish version of the article is available under the following link

This design pattern can be used if we have really a lot of small objects (small like flies…) that differ only in provided state or many data that do operation on similar input (or part of its state is repeatable).

Imagine that you are importing a huge CSV file with several thousand rows of information about TVs…

--

--