PHP implementations of common design patterns