<?php
class Father{
public static $money=80000;
public static function getClass(){
return __class__;
}
public static function getMone(){
return self::getClass()."的工资是:".self::$money."元";
}
}
class sun extends Father{
public static $money=4000;
public static function getClass(){
return __class__;
}
}
echo Father::getClass()."<br>";
echo Father::getMone()."<br>";
echo sun::$money;
echo sun::getClass();
echo "<hr>";
echo sun::getMone()."<br>";//犯了一个小错识误,23行差了一个分号,就24行报错;
?>