开发者

Saving PHP's memory state if an error occurs

I'm curious if anyone knows how I can save the current state of a php application (the one that is currently in memo开发者_如何转开发ry, with everything including declared variables, $_POST, $_GET) when an error occurs?

Currently Zend Server does this. by monitoring the application and saving the snapshot of the php's memory etc. and shows a log related to that?

I'm not even sure if I'm using the right keywords. It's like debugging the application where you can see the values of the variables defined in the php. I just need the state of all the variables for that moment (which an error occurs).


Xdebug does something similar to what you're describing when an error is encountered.

Saving PHP's memory state if an error occurs


(source: zend.com)

You may be able to replicate this without Xdebug or Zend Server using functions like get_defined_vars() and memory_get_usage()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜