参数为类的实例123456789101112131415class C {}class D extends C {}// This doesn't extend C.class E {}function f(C $c) { echo get_class($c)."\n";}f(new C);f(new D);f(new E);
输出为
|
|
参数为接口的实现
|
|
输出为
|
|
参数为类的实例123456789101112131415<?phpclass C {}class D extends C {}// This doesn't extend C.class E {}function f(C $c) { echo get_class($c)."\n";}f(new C);f(new D);f(new E);?>
输出为
|
|
参数为接口的实现
|
|
输出为
|
|
微信打赏
支付宝打赏