title: PHP convert check to use ternary operator
body: <p>I am trying to convert an existing check for a file to use a ternary operator instead. My original check is this...</p>
  
  <pre><code>if (isset($_FILES["file"])) {
      echo '7';
  };
  </code></pre>
  
  <p>This works correctly, my version using ternary operator looks like this...</p>
  
  <pre><code>isset($_FILES['file']) ? $_FILES['file'] : 7;
  </code></pre>
  
  <p>I get the error message...</p>
  
  <blockquote>
    <p>Undefined index: file</p>
  </blockquote>
  
  <p>Why is this happening, where am I going wrong?</p>