What are PHP Namespaces? Last updated on July 22, 2021 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.