Code Sample 1
use Outline\Drawing;
$var = new Drawing();
Code Sample 2
$var = new Outline\Drawing();
Question:
Does PHP make hardware work harder (look up more files or do more processing) if I use code in sample 1? I am sure something gets done, even if it is at the level of some code that figures out which use
line gets matched up with which class. I want to find out exactly what is happenning.
In short:
- What does PHP do when working out the connection between the use of the
use
statement and a class it is supposed to be for? - Are PSR-0/PSR-4 autoloaders affected in the way they work when it comes to these two code samples?