NYCPHP Meetup

NYPHP.org

[nycphp-talk] function references

csnyder chsnyder at gmail.com
Sun Jan 11 10:42:55 EST 2009


On Sun, Jan 11, 2009 at 1:47 AM, Jesse Callaway <bonsaime at gmail.com> wrote:
> Sweet so, I think
>
> $a = 'my_func';
>
> does it for me.

Also works with properties and methods of objects:

$foo = new Bar();
$a = 'my_method';
$result = $foo->{$a}();

Very useful sometimes.



More information about the talk mailing list