开发者

PHP Error constant for error_get_last function

开发者 https://www.devze.com 2023-03-24 12:20 出处:网络
Is ther开发者_运维技巧e a constant or env. variable that stores the last error created? The one that is returned via error_get_last?I don\'t mean to be sarcastic (well, yes, but only a little), but yo

Is ther开发者_运维技巧e a constant or env. variable that stores the last error created? The one that is returned via error_get_last?


I don't mean to be sarcastic (well, yes, but only a little), but you do know the PHP manual has a "See also" section, right? Looking at the page for error_get_last(), I found this little gem: The $php_errormsg variable

Of course, that variable has some limitation (i.e. only works in the scope that the error occurred in, and only if track_errors is on).

But actually, why do you want to use a variable. The point of error_get_last() is to give you the last error, so why not use that?

0

精彩评论

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