Multiple choice technology web technology

When a file is included the code it contains, behave for variable scope of the line on which the include occurs

  1. Any variable available at that line in the calling file will be available within the called file from that point

  2. Any variable available at that line in the calling file will not be available within the called file

  3. Variables are local in both called and calling files

  4. None of above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When a file is included in PHP, it inherits the variable scope from the line where the include statement appears. Any variables available at that point in the calling file become accessible to the included code. Option B is false because variables are shared, not isolated. Option C is false because scope is inherited, not local.