Indirect Modification of Overloaded Element of … Has No Effect

I just ran into that one yesterday by playing around doing some runtime analysis. I started some XDebug-Like output for Hooks and it looks pretty well so far. Now I’d like to know where Hook’s Callbacks were registered prior to their call. For that I overloaded the hooks array and in the first steps, well run into this bummer I was not aware of so far.

In the end this error message saved me some problems because otherwise I had not learned when offsetGet and when offsetSet is invoked in ArrayAccess in such a detail.

For anybody else having the Issue, these are some resources I found useful to better understand the implications this has and the history of it:

This entry was posted in PHP Development and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s