title: What is the shortest way
body: <p>What are the shortest equivalents to the two following statements which do not generate a notice (when error_reporting is E_ALL):</p>
  
  <ol>
  <li><code>$foo = empty($row['foo']) ? 42 : $row['foo'];</code></li>
  <li><code>$foo = empty($row['foo']) ? null : $row['foo'];</code></li>
  </ol>
  
  <p>The variable in <code>empty()</code> could be non existent or an empty string.</p>
  
  <p>This has been bugging me for so long. I have been searching for alternatives across the Internet, including SO. </p>
  
  <p>The null coalescing operator does not seem to work:</p>
  
  <pre><code>$foo = $bar ?? 42;
  var_dump($foo);
  </code></pre>
  
  <p>returns <code>''</code>, not <code>42</code>. </p>
  
  <p>Are my examples really the shortest form to write it?</p>