Class Extends In Php
<p>I have 3 pieces of the file</p>

<pre><code>1. a.php

    &lt;?
    class a {
         public function name () {
             return "My name is ukungzulfah";
         }
    }
    ?&gt;

2. b.php

    &lt;?
    class b extends a {
         function na () {
             echo $ this-&gt; name ();
         }
    }

    ?&gt;

3.c.php

    &lt;?
    include "a.php";
    include "b.php";

    $ te = new b;
    echo $ te:: na ();

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

<p>The result is an error:
Fatal error: Using $ this Pls note in object context in C: \ xampp \ htdocs \ sampleNetbeans \ controller \ welcome.php on line 4.</p>

<p>Is there something wrong with the code above. if called from b.php was no problem, the problem only if the call by c.php file.</p>
