Hi internals,

I would like to implement FR #45235. below copied from Github.

What do you think about it?

-----
You can view the Pull Request on github:
https://github.com/php/php-src/pull/1135

Pull Request Description:
In PHP a simple assign expression would raise error, if user use
error_get_last() to check they can't guarantee the call site raise the
error.

This patch implement a function to clear the error state.


http://php.net/error_get_last
The top voted user contributed note are a tricky way to clear last error.

also there are a lot of apps use the similar hacks.

1.
https://github.com/mathnerd3141/doeqs_new/blob/ba23c478a0c819dc6b2f8f96f9df35d16505eed2/errors.php#L20
2.
https://github.com/benfinke/cargo_plane/blob/4911bc6a91d8345aa62c81fb52c8bed9d216c44e/Splunk/Util.php#L89

Request: https://bugs.php.net/bug.php?id=45235

-- 
Reeze Xia
http://reeze.cn

Reply via email to