assign function to class method
<p>Is it possible to create a function out of a class method?</p>

<p>ie.</p>

<pre><code>class Test {

    public function __construct()
    {
        if ( ! function_exists('foo') ) {
            function foo ()
            {
                 return $this-&gt;foo();
            }
        }
    }

    private function foo()
    {
        return 'bar';
    }

}
</code></pre>

<p>Or would I have to do it the other way around, creating a function and using it within the method?</p>
