Php variable in global scope from one file is NOT undefined in other

I have to files in my project

a.php:

<?php
$abc = 12;

b.php:

<?php
var_dump($abc);

 

They are in very different pathes. There is no includes in files. Nothing that could be considered as connection between files.

But PhpStorm shows that $abc in file b.php is defined. When i "go to definition" on $abc in b.php file a.php is opening.

I expect to see that $abc in b.php is undefined.

Can this be fixed with settings (i can not find anything)? Is this bug or feature?

Please sign in to leave a comment.