What is PHP D.I when and how to use it

Yeah, its coding to an interface, not an implementation. But it doesnt have to be a PHP interface, an abstract class will fit as well, and maybe even a concrete superclass.