title: If null use other variable in one line in PHP
body: <p>Is there in PHP something similar to JavaScript's:</p>
  
  <pre><code>alert(test || 'Hello');
  </code></pre>
  
  <p>So, when test is undefined or null we'll see Hello, otherwise - we'll see the value of test.</p>
  
  <p>I tried similar syntax in PHP but it doesn't seem to be working right... Also I've got no idea how to google this problem..</p>
  
  <p>thanks</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I should probably add that I wanted to use it inside an array:</p>
  
  <pre><code>$arr = array($one || 'one?', $two || 'two?'); //This is wrong
  </code></pre>
  
  <p>But indeed, I can use the inline '? :' if statement here as well, thanks.</p>
  
  <pre><code>$arr = array(is_null($one) ? "one?" : $one, is_null($two) ? "two ?" : $two); //OK
  </code></pre>