If you’re using namespaces when working on your WordPress plugins (or whatever project you have going on), then you’re likely also taking advantage of a PHP autoloader.

Though this post isn’t really meant to be a tutorial on how to use them (I have another one of those coming up later), here’s the gist of what an autoloader is (or does):
One of the biggest annoyances is having to write a long list of needed includes at the beginning of each script (one for each class) … By registering autoloaders, PHP is given a last chance to load the class or interface before it fails with an error.
It’s a feature that, if your environment supports it, should be used. But I digress.
The point of this post is how to combat the potential problem you may encounter when using a PHP autoloader in your code and alongside other plugins.


