Namespaces PHP કોડને સંગઠિત કરે છે અને નામ સાથેના સંઘર્ષો (naming collisions) ને રોકે છે — વર્ગો, ફંક્શન્સ અને સ્થિરાંકો વચ્ચે આવતા સંઘર્ષો અનિવાર્ય છે જયારે એપ્લીકેશનો વધે અને તૃતીય-પક્ષ પેકેજીસ વાપરે છે. તેઓ વર્ગ નામો માટે ડિરેક્ટરીઓ જેવી રીતે કામ કરે છે, અને Composer autoloading (PSR-4) સાથે એકીકૃત થાય છે.
Namespaces જે સમસ્યાને હલ કરે છે
Without namespaces, two classes named `User` (yours and a library's) would COLLIDE
("cannot redeclare class"). Namespaces give each a unique fully-qualified name.
