Eric K wrote:
Suppose I have a variable called $Test_int, somewhere
in the mediawiki extension that I'm trying to make. Whats the easiest way to know what
value that variable has been assigned?
I've tried $wgOut but in this case, it probably outputs wgOut but its all gone in the
blink of an eye when the page refreshes or when other codes executes. I need a more
permanent method of tracking the variable value. Any hints?
Set up PHP error logging and then in your extension code, put:
error_log("Value of test is :" . $Test_int . ":\n");
That will output to the error log the value bracketed by the text,
Value of test is :42:
I prefer to bracket the output with some character like a colon ( : ) or
something similar so I can see any preceding or following blanks (or
non-displayable characters) if the variable is a string.
For info on error logging, see: