<?php
class test
{
public function fun1()
{
$this->fun2();
} private function fun2()
{
echo 'fun2()';
}
} $t = new test();
$t->fun1();
$t->fun2(); //直接调用私有方法是错误的
?>
class test
{
public function fun1()
{
$this->fun2();
} private function fun2()
{
echo 'fun2()';
}
} $t = new test();
$t->fun1();
$t->fun2(); //直接调用私有方法是错误的
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货