Prior to version 5.5, the best way is to always use the fully qualified class name:
public function doesBooClassExist() { return class_exists('Foo\Boo'); }
It is not difficult, and it is absolutely clear what you are talking about. Remember, you must go for readability. Importing a namespace is convenient for writing, but makes reading confusing (because you need to keep in mind the current namespace and any imports when reading the code).
However, a new design appeared in 5.5:
public function doesBooClassExist() { return class_exists(Boo::class); }
The pseudo-magic class constant can be placed in any identifier, and it will return the full name of the class, which will be resolved ........
ircmaxell Apr 05 '13 at 17:31
source share