Since PHP is a loosely typed language, how can the DIP principle be applied in PHP?
A practical example would be greatly appreciated.