/** * get a carbon instance for the current date and time * * @param datetimezone|string $tz * * @return static */ public static function now($tz = null) { return new static(null, $tz); }
这个是carbon类里返回当前时间的方法,想问直接return一个static是啥用法。实际发生了什么呢。
回复讨论(解决方案) 后期静态绑定 http://php.net/manual/zh/language.oop5.late-static-bindings.php
你看到的只是函?的和返回值,?理方法被?藏了
