- var_dump: documentation ( source)
- is_callable: documentation ( source)
- method_exists: documentation ( source)
<?php
class A {
function a() {}
}
class B extends A {}
class C extends B {
function a() {
var_dump( is_callable( 'parent::a' ) );
var_dump( is_callable( 'A::a' ) );
var_dump( is_callable( array( 'A', 'a' ) ) );
var_dump( method_exists( 'parent', 'a' ) );
var_dump( method_exists( 'A', 'a' ) );
}
}
$c = new C;
$c->a();