# String reference to function?

**URL:** <https://forum.kirupa.com/t/string-reference-to-function/330896>\
**Category:** flash\
**Created:** [April 3, 2013, 5:21pm UTC](https://forum.kirupa.com/t/string-reference-to-function/330896 "2013-04-03T17:21:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)\
**Post date:** [April 3, 2013, 5:21pm UTC](https://forum.kirupa.com/t/string-reference-to-function/330896/1 "2013-04-03T17:21:30Z")

</div>

Is there a way to create a string from the name of a function? This is probably not a very descriptive question, sorry, but ultimately what I’m looking for is this:

```php
function foobar():void {
    trace(maybe(someArg)); // foobar
}
function another():void {
    trace(maybe(someOtherArg)); // another
}
function maybe(arg):String {
     return [do something here];
}

```

So I’m looking for what maybe() would do, or of course a more compact technique if possible.

Thanks!
