- var_dump: documentation ( source)
- is_callable: documentation ( source)
<?php
class Foo {
public $arr = array("test");
function bar( $str ){
$val = $this->{arr[0]};
var_dump($val);
if ( is_callable( self::$val ) ){
self::{$this->arr[0]}( $str );
}
}
static function test($var) {
echo "Testing: $var\n";
}
}
(new Foo)->bar("bla");