- var_dump: documentation ( source)
- method_exists: documentation ( source)
<?php
class Base{
function checkMethod(){
var_dump(method_exists($this, 'foo'));
}
}
class Child extends Base{
function foo() {
}
}
$base = new base();
$base->checkMethod();
$child = new Child();
$child->checkMethod();