<?php
class Stat
{
public $var1='H';
public static $staticVar = 'Static var';
static function check()
{
echo $this->var1;
echo "<br />".self::$staticVar ."<br />";
self::$staticVar = 'Changed Static';
echo self::$staticVar."<br />";
}
function check2()
{
Stat::check();
echo $this->var1;
echo "b";
}
}
?>
我可以这样用吗
$a = new Stat();
$a->check2();