类 - gitsnippet/blog GitHub Wiki

1.基本 public private protected 2.组合 public static private static protected static 类属性的调用

class human{
  public static $money="2000";
  }

echo human::$money;

这样写时

class human{
  private static $money="2000";
必须在human类的内部

 self::$money的方式调用

3.construct函数 设置默认参数

class human{
  public function __construct($name="tom",$age="20"){
    $this->name=$name;
    $this->age=$age;
  }
}

https://www.cnblogs.com/xzj8023tp/p/6280474.html

class Math
{
    public static function ceil($value)
    {
        return ceil($value);
    }

    public static function floor($value)
    {
        return floor($value);
    }
}

https://www.cnblogs.com/yuyu1993/p/5576010.html