Key dynamically created member variables a very strange question.
This post was last edited by lytreo650 on 2014-06-20 10:22:34
Using TP to do the project, the parent class dynamically creates a member variable, and then I randomly print something like this in the subclass dump ($this-$GFRGRR) can print out all dynamically created member variables, $GFRGRR is an undeclared variable. The printed thing is a large array, and each member variable is an element of the array. Another example is the dynamically created member variable has an element is $this->cert, then I $ A = ' cert ', in the printing $this-> $a, will still print out all the dynamically created member variables, I ask you why this? Is the TP action doing some expansion? Because it is the company's project inconvenient to stick out the source code, can we give a thought? Thank you!
------Solution--------------------
The parent class dynamically creates what type of member variable it is, and if it is private it will not output.
------Solution--------------------
It is not clear that the default is public and that it is normal to be able to adjust.
If you don't want to use it externally, you can write it as a protected/private, if the sub-category is not. It's good to use private directly.