title: How can I check whether only one out of three variables is not empty?
body: <p>I have three variables:</p>
  
  <pre><code>$var1
  $var2
  $var3
  </code></pre>
  
  <p>I'm actually looking for the best way to check if <strong>only one</strong> of these three variables is not empty and the <strong>two others</strong> are empty.</p>
  
  <p>Is that possible to do this with one <code>if</code> only? If not, then what's the best way?</p>
  
  <p>The variables all contain text.</p>