if (is_file($classfile))
require_once $classfile;
if (! class_exists($classname, false))
exit('ERROR: ' . $classname . ' is not defined as a Class');
The above code is useful to tell if the class was defined. You could also use another commentors method using Try Catch Exceptions. But, if you do not use try blocks much, the above function based method works just fine.
From there, you can than call:
$class = new ReflectionClass($classname);
if (! $class->isSubclassOf('PanelCommon'))
exit("ERROR: {$classname} must extends PanelCommon");
if (! $class->isUserDefined())
exit("ERROR: {$classname} must be user defined and not internal to PHP");
if (! $class->IsInstantiable())
exit("ERROR: {$classname} must be IsInstantiable and not an Interface or Abstract class");
if (! $class->hasMethod('home'))
exit("ERROR: {$classname} lacks required method/function home()");
Forforth and so on.