运行时发错,望高人指点,多谢

WBOY
Release: 2016-06-13 11:29:29
Original
715 people have browsed it

运行时发错,望高人指点,谢谢
final  class MyPc{
static $name="我的电脑";
    static  function power(){
echo  self::$name."电脑开中...";
    }
}
MyPc::$name="你的电脑哦";
echo  MyPc::power()


  final  class My1{
const NAME="我的电脑";
    static  function power1(){
echo  My1::NAME."电脑开中...";
    }
}

  My1::power1();

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!