<?php
abstract class A
{
}
class B extends A
{
}
class C
{
public $x;
public function __construct(A $b)
{
$this->x = $b;
}
}
$b = new B();
$c = new C($b);
PD9waHAKCmFic3RyYWN0IGNsYXNzIEEKewp9CmNsYXNzIEIgZXh0ZW5kcyBBCnsKCQp9CmNsYXNzIEMKewoJcHVibGljICR4OwoJCglwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoQSAkYikKCXsKCQkkdGhpcy0+eCA9ICRiOwoJCXZhcl9kdW1wKCR0aGlzLT54KTsKCX0KfQoKJGIgPSBuZXcgQigpOwokYyA9IG5ldyBDKCRiKTs=