What are PHP Namespaces? Last updated on January 28, 2023 by Sal Ferrarello When two functions (or classes) have the same name, it triggers a fatal error in PHP. Namespaces are used to avoid these naming collisions.