I have created a class that works as a singleton (though that's not related to the problem). I have noticed that the constructor of the class doesn't get to access the value of a variable that has already been defined in a prevoius include.
It's something like this:
A.php includes B.php (B is the one that defines the variable).
A.php includes singleton.php
then in A.php I try to get an instance of singleton.
Teting, I was able to see that the variable value is reachable outside of the class definition (by testing with echos). But inside the class (in the constructor, to be precise), that variable is empty. What can I do?