Tuesday, May 8, 2012

Php, how to determine if a class (and not taking account subclasses!) has a method?

I know theres a method_exists() but it says true even when that method is inherited.



class A
{
public function eix()
{
}
}

class B extends A
{
}


echo method_exists ('B', 'eix');



so its true, but B class doesnt have it. How to dodge this?





No comments:

Post a Comment