One of the usecases where this is useful is a result object to avoid multiple return types.
<?php
interface PingResultInterface
{
public function isSuccessful();
}
?>
Given we have 2 implementations, one would be a ping that is executed before creating the object (value object) and one that's lazy (proxy), they could be made runtime based on certain things:
pastebin.com/LPGaHRCF