PHP: is it possible to call nesting object's method inside nested object?
<p>I don't know how to explain this better, so (see comment inside second class):</p>

<pre><code>&lt;?php

    class main {
        public function something() {
            echo("do something");
        }
        public function something_else() {
            $child=new child();
            $child-&gt;child_function();
        }
    }

    class child {
        public function child_function() {
            echo("child function");
            //is it possible to call main-&gt;something() here somehow if this class is initiated inside class main?
        }
    }

?&gt;
</code></pre>
