codeguy/php-the-right-way — pull request #273 by simonrjones (2013-06-02 09:57:56+00:00)
Title: Removing \ from global functions

As per my message on:

https://github.com/codeguy/php-the-right-way/commit/78b8adc0157bb6b7aba55651a46f0d4adf46a179

Calls to global functions like var_dump don't need the \ prefix. It's only necessary to do this if you're using namespaces (this example doesn't) and you have a method that clashes with the global one. In this guide I think the \ prefix is confusing to users unfamiliar with namespaces so I suggest they are removed.

I've also included a minor amend to add parentheses after the instantiation of the singleton object to make this code a bit more obvious to users.

best wishes,
Si