摘要:
_tostring()方法 class ren{ public $name; public function __tostring() { return "name代表姓名"; }}$r=new ren();echo $r; 这个方法要有返回值,写在类里,输出对象的引用 克隆对象 class ren 阅读全文
摘要:
//静态//普通成员:属于对象//静态成员:属于类的//关键字:static/*class fenbi{ public $length; public static $color="红"; public static function test() { echo "静态成员方法".self::$co 阅读全文