You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
187 B

<?php
class C{}
class D extends C{} //类D继承自类C
class E{}
functionf(C $c){
echo get_class($c)."\n";
}
f(new C);
f(new D);
f(new E);
?>