I'm stumped by a small amount of object-oriented code I've been working on.
The main script contains a single object of class Keyword_set.
Keyword_set contains an associative array of Keyword objects.
Keyword contains an associative array of Page objects.
Keyword and Page both have a get_object($string) function that should return the relevant object from the relevant array, or create an entry in the array if one does not already exist for that string. (The code structure for this function is exactly the same in both classes.)
The array in Keyword_set seems to hold up fine, but the array in my Keyword objects seems to go blank everytime the script exits the Keyword_set object. An integer value in my Keyword objects can be recalled no problem, so it's just the array that seems to go blank.
Is there something about object data lifetime in PHP 4 that means I'll always lose my array data in objects that are deeper than one reference away?