3
여기 내 코드입니다 :속성을 초기화하지 않는 이유는 무엇입니까?
class Log
{
private $mode = config('my.log.mode');
}
하지만 구문 오류가 발생합니다 ..! 왜? 뭐가 문제 야?
이뿐만 아니라 작동 주목 : 잘class Log
{
private $mode;
public function __construct()
{
$this->mode = config('my.log.mode');
}
}
, 요점은 무엇?!
.. PHP 5.6의 스칼라 표현식 : http://docs.php.net/manual/en/migration56.new-features.php#migration56.new-features.const-scalar-exprs – simon