Can I also run the parent's foo() function through $a or it was override ?
Not from the "outside". Say:
<?php
class A {
function talk( ) {
return 'Hello world';
}
}
class B extends A {
function talk( ) {
return 'Goodbye world';
}
}
$b = new B;
$b->talk( ); // Goodbye world.
In this example, it's not possible to have $b->talk output A::talk( ), other than proxying that through B. If you need to have the result from A instead of B, you might want to explain your dilemma; that's a problem you shouldn't run into, and if you do, the chances are the design isn't optimal.