PHP-Дайджест № 165 (23 сентября – 7 октября 2019)
class Car
{
public int $yearOfProduction;
public string $vin;
}
$car = new Car {
yearOfProduction = 2019,
vin = "1FTFW1CVXAFD54385",
};
$car = new Car {
yearOfProduction = 2019,
}; // throws RuntimeException: Initialization of Car class object failed due to missing required properties