I can't possibly reproduce the code for this as the 2 classes in question are about 1500 lines each and condensing is in this case impossible due to algorithmic logic dependencies.
Let's say you have a Class A and a Class B. Let's say Class A is like this:
class A {
var $b;
function A() {
$this->b =& new B();
}
function getOtherUniqueStuff() {
return "this is other unique stuff";
}
function displayStuffFromB() {
$html = $this->b->displayStuff('isFromA');
}
}
-----------------------------------------------------------------
Basically, Class A will display stuff from a locally instantiated B object property.
Here is class B:
class B {
function B() {}
function displayStuff($isFromA = false) {
$html = "blah blah blah blah";
if ($isFromA) {
$html .= A::getOtherUniqueStuff();
}
return $html;
}
}
------------------------------------------------------------------
Everything is fine and dandy, except in PHP 4.3.2 I get the following error:
Fatal error use of undefined function getotheruniquestuff
The line that produces that error is:
$html .= A::getOtherUniqueStuff();
This is why I need to get a better grip on OO PHP, I can't get past this problem and have no solution, can someone please help?
Thanx
Phil