<?php
class Foo
{
public $array = array('key' => "someFunc");
public function someFunc($foo, $bar)
{
return $foo . $bar;
}
public function callFuncsFromArray()
{
foreach($this->array as $value) { }
return $bar;
}
}
$foo = new Foo();
PD9waHAKIApjbGFzcyBGb28gCnsKCXB1YmxpYyAkYXJyYXkgPSBhcnJheSgna2V5JyA9PiAic29tZUZ1bmMiKTsKCQoJcHVibGljIGZ1bmN0aW9uIHNvbWVGdW5jKCRmb28sICRiYXIpCgl7CgkJcmV0dXJuICRmb28gLiAkYmFyOwoJfQogCglwdWJsaWMgZnVuY3Rpb24gY2FsbEZ1bmNzRnJvbUFycmF5KCkgCgl7CgkJZm9yZWFjaCgkdGhpcy0+YXJyYXkgYXMgJHZhbHVlKSB7CgkJCSRiYXIgPSBjYWxsX3VzZXJfZnVuY19hcnJheShbIkZvbyIsICR2YWx1ZV0sIFsiRk9PIiwgIkJBUiJdKTsKCQl9CiAKCQlyZXR1cm4gJGJhcjsKCX0KfQogCiRmb28gPSBuZXcgRm9vKCk7CiAKdmFyX2R1bXAoJGZvby0+Y2FsbEZ1bmNzRnJvbUFycmF5KCkpOw==