- var_dump: documentation ( source)
- method_exists: documentation ( source)
<?php
function test($var) {
echo "in function ",__FUNCTION__,"\n";
echo "Test: \$var == $var\n";
}
class foo {
static function hello(){
echo "hi\n";
}
function bar() {
$this->test('something');
}
}
$a = new foo();
$a->bar();
foo::hello();
var_dump(method_exists($a,'test'));
var_dump(method_exists('foo','hello'));