復制代碼 代碼如下:
<?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; }
}
新聞熱點
疑難解答