title: Is there a better PHP way for getting default value by key from array (dictionary)?
body: <p>In <em>Python</em> one can do:</p>
  <pre><code>foo = {}
  assert foo.get('bar', 'baz') == 'baz'
  </code></pre>
  <p>In <em>PHP</em> one can go for a trinary operator as in:</p>
  <pre><code>$foo = array();
  assert( (isset($foo['bar'])) ? $foo['bar'] : 'baz' == 'baz' );
  </code></pre>
  <p>I am looking for a golf version. Can I do it shorter/better in PHP?</p>
  <h3>UPDATE [March 2020]:</h3>
  <pre><code>assert($foo['bar'] ?? 'baz' == 'baz');
  </code></pre>
  <p>It seems that <code>Null coalescing operator ??</code> is <a href="https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op" rel="noreferrer">worth checking out</a> today.</p>
  <p><em>found in the comments below (+1)</em></p>