title: PHP assign first not-null value
body: <p>I've got some three values like this:</p>
  
  <pre><code>$a = null
  $b = 3;
  $c = null
  </code></pre>
  
  <p>(I never know what will be <code>null</code>: maybe all of them, maybe none of them.)</p>
  
  <p>Following so called <em>lazy loading</em>, I've tried to assign the <strong>first</strong> not-null value this way:</p>
  
  <pre><code>$d = $a or $b or $c;
  </code></pre>
  
  <p>(It is similar to JavaScript way <code>var d = a || b;</code> (it will assign b if there is no a).)</p>
  
  <p>But in PHP it seems to not work.</p>
  
  <p>Am I doing it wrong, or what is best and simplest way to do this?</p>