Backslash before function name in PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Dear All,

I was looking for advanced PHP OO programming tutorials and came

They present nice tutorials, but one thing puzzled me: in some of the
code there are backslashes before function names, e.g.:

\spl_autoload_register(array($autoLoader, 'load'));
\class_exists($classname) || \interface_exists($classname)){
 if (\file_exists($file)){

(have a look at ).

What does the backslash before the function name do?


Re: Backslash before function name in PHP

Am 14.03.2011 03:01, schrieb cityuk:

Quoted text here. Click to load it

It's a PHP 5.3 feature:



Site Timeline