Design Patterns PHP - Abstract Factory Java

1) At the very beginning?

class ProductA


class ProductB


We have some simple application, somewhere we need objects A and in other place somewhere we need objects B

and clients

$productA = new ProductA();

$productB = new ProductB();

2) We are expanding application ...

I turns out that sometimes in application depending on some settings we need to implement in different way this objects of "ProductA" and "ProductB"
Let see this in step 2