- class_exists: documentation ( source)
<?PHP
// If you are using Zend Framework's autoloader
// this example will crash with no errors on
// the class_exists() call.
interface MyInterface
{
public function refreshData();
}
abstract class MyAbstract implements MyInterface
{
// THIS IS THE ERROR...
// the function should be 'public'
abstract protected function refreshData();
}
class MyClass extends MyAbstract
{
public function refreshData()
{
print "am in refreshData";
}
}
//--------------------------------------------
if (class_exists('MyClass',true)) {
$mine = new MyClass();
$mine->refreshData();
}