<?php class Foo {} class Goo extends Foo {} class FooFactory { static function create(Foo $foo) { return $foo; } } class GooFactory extends FooFactory { static function create(Goo $goo) { return $goo; } } var_dump(FooFactory::create(new Foo())); var_dump(GooFactory::create(new Goo()));
You have javascript disabled. You will not be able to edit any code.
There are `0` results