<?php
class test{
public static $status="very good";
public $name='雷锋';
public function myinfo(){
echo '我叫:'.$this->name.'我的状态:'.self::$status='不知道';
}
public function myinfo1(){
echo '我叫:'.$this->name='123'.'我的状态:'.self::$status='第二次赋值';
}
}
$test=new test();
$test->myinfo();
echo '<br>';
echo '<br>';
$test->myinfo1();
echo '<br>';
echo '<br>';
echo $test->name;
echo '<br>';
echo '<br>';
echo test::$status;
echo '<br>';
echo '<br>';
$test1=new test();//第二次实例化
$test1->myinfo();
echo '<br>';
echo '<br>';
$test1->myinfo1();
echo '<br>';
echo '<br>';
echo $test1->name;
echo '<br>';
echo '<br>';
echo $test1::$status;