1 Replies Last post: Jan 31, 2012 8:54 PM by Nikolay Matveev  
Kay Plößer Newbie 3 posts since
Dec 13, 2011
Currently Being Moderated

Dec 13, 2011 7:37 PM

How to use watches right?

I'm maintaining a big ugly PHP-project, much giant classes with all public vars and stuff...

 

I wanted to add a few deep member variables of a class to the watchlist.

 

First I tried to use a $this ref in the watch, which broke when I left the method of the class:

 

$this->m_oMyVar->value

 

Then I got me a reference tree from a global object. I thought it's an absolut reference to the value, so it should be the same everywhere:

 

$application->...->...->...->m_oMyVar->value

 

Which worked but only till I left the request, when I entered a new request they showd just "error"

 

How could this feature possible help me, if it doesn't keep track of the variables I want?!

Nikolay Matveev Apprentice 697 posts since
Apr 14, 2010
Currently Being Moderated
Jan 31, 2012 8:54 PM in response to: Kay Plößer
Re: How to use watches right?

Hello Kay,

 

Sorry for delay. Watches can show you the value of any php expression which is valid at the current execution point. If you want access a global variable you can address it using $GLOBALS array.

 

Thank you for feedback!

More Like This

  • Retrieving data ...