class SomeClass {
private $settings = [
'a' => 1,
'b' => 2,
];
function __construct($options)
{
$this->settings = array_replace_recursive(
$options,
$this->settings
);
}
}
Однако в таком случае не выйдет по-простому получить собственно настройки по умолчанию и определить, какие из них изменены.