Design patterns are reusable component for general problems during the development life cycle. Suppose a service company like infosys they are developing applications generally for their clients. Each and every application have some part in common. So we can consider those part as a reusable component. The reusable components have some specific part in common gathering those specific part and define it as a pattern so that the same pattern can be applied for other projects.
For eg: Most of the common web applications need have the functionality of file uploading from a client system. We can consider the uploading components as a design pattern.
Above diagram shows file uploading design pattern.
PHP5 is strongly object oriented programming language. Almost all the web application need the functionality. The above class diagram can be implemented in php5.