复制代码 代码如下:
<?php
Class Father {
public function fmeth1() {
echo "fmeth1()...<br>";
}
//public function fmeth1($str1) {
// echo "fmeth1() with $str1...<br>";
//}
}
Class Son extends Father {
public function fmeth1() {
echo "fmeth1() in son...<br>";
}
}
$s=new Son();
$s->fmeth1();
?>
复制代码 代码如下:
class A {
protected int method1(int a, int b) { return 0; }
}
新闻热点
疑难解答