Call static function with parameter as a callback
<p>I'm trying to pass static function as a callback with parameter, as I'm using old version of PHP, I can't use anonymous function, as it's done in original code <a href="https://github.com/bobthecow/mustache.php/wiki" rel="nofollow">https://github.com/bobthecow/mustache.php/wiki</a> , in section "Using all these options".</p>

<pre><code>class SampleClass {

    function __construct( ) {

    }

    static function generateHTML($markup, $data) {
        require_once( 'lib/Mustache/Autoloader.php' );

        Mustache_Autoloader::register();

        $mengine = new Mustache_Engine(array(
            'escape' =&gt; /* Here I need to pass escapeMustache function */
        ));

        $renderer = new TempRenderer($data, false);
        echo $mengine-&gt;render($markup, $renderer);
    }
    static function escapeMustache($value) {
        return $value;
    }

}
</code></pre>

<p>What's the best way to pass custom escape function?</p>

<p>Thank you.</p>
