📜  php 8 构造函数属性提升 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:39.903000             🧑  作者: Mango

代码示例2
class CustomerDTO
{
    public function __construct(
        public string $name, 
        public string $email, 
        public DateTimeImmutable $birth_date,
    ) {}
}