What does a \ (backslash) do in PHP (5.3+)?

\ (backslash) is the namespace separator in PHP 5.3.

A \ before the beginning of a function represents the Global Namespace.

Putting it there will ensure that the function called is from the global namespace, even if there is a function by the same name in the current namespace.

Leave a Comment