Class Inheritance Problem
<p>I have A.php and B.php</p>

<p>A.php</p>

<pre><code>&lt;?php
error_reporting(E_ALL);
ini_set("display_errors",1);
class myClass
{
  function hello()
  {
    return 'hello';
  }  
}
?&gt;
</code></pre>

<p>B.php</p>

<pre><code>&lt;?php
error_reporting(E_ALL);
ini_set("display_errors",1);
require_once('/A.php');
$a = new myClass();
testing();

function testing()
{    
    echo $a -&gt;hello();
}
?&gt;
</code></pre>

<p>B.php inherits A.php ,
if i run B.php,but it show 
"Fatal error: Call to a member function hello() on a non-object."</p>

<p>So the question is simple, how can i correct this ,but "$a = new myClass();" is not inside the function, since in .NET world can do this, i believe PHP also possible.</p>

<p>And one more question is, what is the modify of function in A.php ,if i have not state  private/public/protected?</p>
