class testone
{ protected function nihao()
{ echo ' i love you';
}
}
$ceshi=new testone;
$ceshi->nihao();
-------------------
请问 php能否调用 portected 函数?
php,能否调用,类中 portected 的函数?
答案:2 悬赏:20
解决时间 2021-03-06 05:15
- 提问者网友:生亦何欢
- 2021-03-05 05:19
最佳答案
- 二级知识专家网友:邪性洒脱
- 2021-03-05 06:50
不能,只有public的才能在类外面调用。
全部回答
- 1楼网友:浪者不回头
- 2021-03-05 08:07
应该能吧,不确定。
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯