Underscores were used at a time when PHP did not yet support namespaces. A “right” organized project follows the agreement of namespacing files in the same way as the directory structure.
This is just some general rule for organizing files in a project.
So, if you have a directory structure:
root
Name
Package
MyClass.php
Formerly people:
class Name_Package_MyClass {}
But now that we have namespaces, it becomes:
namespace Name\Package;
class MyClass { }
This is just a coding style style that ensures everyone does the same.
, PSR-0, , namespacing .