Recently I\'ve read about namespaces and how they are beneficial. I\'m currently creating a project in Laravel and trying to move from class map autoloading to namespacing.
Here are the major differences,
1. For example if you define that the Acme\Foo\ namespace is anchored in src/,
Acme\Foo\Bar in src/Acme/Foo/Bar.phpAcme\Foo\Bar in src/Bar.php(where Bar class is).2. PSR-4 does not convert underscores to directory separators
3. You would prefer using PSR-4 with namespaces
4. PSR-0 will not work even if the class name is different from file name, like considering above example:
Acme\Foo\Bar ---> src/Acme/Foo/Bar.php (for Bar class) will workAcme\Foo\Bar ---> src/Acme/Foo/Bar2.php (for Bar class) will not work