I have a class in fileA.php like so:
class Test {
private foo;
public function array() {
$this->$foo = array ( 'a', 'b', 'c', 'd', 'e' );
return $foo;
}
}
I want to change the array returned by the method to:
array('x', 'y', 'z')
Not sure if this the right way to about it, but this is what I tried in fileB.php:
require_once('fileA.php');
class TestB extends Test {
public function array() {
$this->$foo = array('x', 'y', 'z');
return $foo;
}
}
Is it possible to make this modification? Any help will be greatly appreciated.
Thanks