I'd like to capture the output of var_dump
to a string.
The PHP docs say;
As with anything that outputs its result directly to the browser, the output-control functions can be used to capture the output of this function, and save it in a string (for example).
Can someone give me an example of how that might work?
print_r()
isn't a valid possibility because it's not going to give me the information that I need.
转载于:https://stackoverflow.com/questions/139474/how-can-i-capture-the-result-of-var-dump-to-a-string