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
Комментариев нет:
Отправить комментарий