title: How to make a PHP structure, that doesn't complain about requests of undefined properties?
body: <p>I have a bunch of optional settings and I'm sick of checking for <code>isset</code> and <code>property_exists</code>.</p>
  
  <p>In Laravel, if I ask for a property that does not exist on a model or request, I get <code>null</code> and no complaints (errors). How can I do the same for my data structure.</p>
  
  <p>If I try array, I can't do simple <code>$settings['setting13']</code>, I have to either pre-fill it all with nulls or do <code>isset($settings['setting13']) ? $settings['setting13'] : ''</code> or <code>$settings['setting13'] ?? null</code>. If I try an object (<code>new \stdClass()</code>), <code>$settings-&gt;setting13</code> still gives me a warning of Undefined property.</p>
  
  <p>How can I make a class such that it responds <code>null</code> or an empty string whenever it is asked for a property that it doesn't have?</p>