title: Calling an overridden parent method
body: <p>In the sample code below, the method <code>test()</code> in parent class <code>Foo</code> is overridden by the method <code>test()</code> in child class <code>Bar</code>.  Is it possible to call <code>Foo::test()</code> from <code>Bar::test()</code>?</p>
  
  <pre><code>class Foo 
  {
    $text = "world\n";
  
    protected function test() {
      echo $this-&gt;text;
    }
  }// class Foo
  
  class Bar extends Foo 
  {
    public function test() {
      echo "Hello, ";
  
      // Cannot use 'parent::test()' because, in this case,
      // Foo::test() requires object data from $this
      parent::test();
    }
  }// class Bar extends Foo
  
  $x = new Bar;
  $x-&gt;test();
  </code></pre>