Open Closed Principle (OCP)¶
The open–closed principle states that classes should be open for extension, but closed for modification.
The OCP is a general principle, that is applicable to PHP’s structures.
See also The Open Closed Principle, Open-Closed Principle Example Using PHP