To view parent comment, click here.
To read all comments associated with this story, please click here.
And how is reflection at fault here?
Err, what did I miss? I don't follow you. My example had nothing to do with reflection, it had to do with php not requiring you to declare variables.
I guess my example wasn't too good because he was asking about functions/methods and I was talking about variables. I'm not going to try to invent an example for functions/methods because I don't understand enough about how php handles them but I don't think it's too hard to come up with a scenario where you mistype or make a bad assumption and something unintended happens.
Anyways, this is getting too much into the semantics of strongly/weakly typed languages. As I said before, both have their advantages and places (I personally happen to be much more comfortable with strong typing).
Sorry, I assumed that you were saying that the ability to dynamically add methods was going to create security issues. The poster you replied to assumed the same thing, since he asked for an example relating to that.
As for declaring variables, it is not that big of an issue. On your development server, just configure PHP to give you a notice whenever it encounters an uninitialised variable.





Member since:
2005-07-06
And how is reflection at fault here?