title: PHPStorm: undefined variables caused by include/require
body: <p>PHPStorm showed that all the variables from other files, both required and included, are undefined. I found this solution <a href="https://stackoverflow.com/questions/11751330/phpstorm-warning-php-variable-might-not-have-been-defined">here</a>, but after I disabled that option <code>Ignore 'include' and 'require' statements</code>, the IDE ignored all undefined variables. </p>
  
  <p>For example, I have a file <code>a.php</code> with content <code>$name = 'Bob'</code>, and file <code>b.php</code>, which require the file <code>a.php</code>. When I type <code>echo $name</code> in file <code>b.php</code> it works as expected and displays <code>'Bob'</code>. The IDE, however, highlights the variable <code>$name</code> claiming it's undefined. If I disable that option <code>'Undefined variable' - Ignore 'include' and 'require' statements</code>, the IDE stops highlighting it. </p>
  
  <p>With that option I can now write any variables, for example <code>$sdadasdasdas</code> in file <code>b.php</code> and the IDE doesn't highlight it. </p>
  
  <p>Can PHPStorm understand which variables are set in included/required files and which ones are not?</p>