How can I capture the result of var_dump to a string?

后端 未结 13 1627
挽巷
挽巷 2020-11-27 08:39

I\'d like to capture the output of var_dump to a string.

The PHP documentation says;

As with anything that outputs its result directly to the

13条回答
  •  無奈伤痛
    2020-11-27 09:20

    If you want to have a look at a variable's contents during runtime, consider using a real debugger like XDebug. That way you don't need to mess up your source code, and you can use a debugger even while normal users visit your application. They won't notice.

提交回复
热议问题