Hi! > You can cast your vote on the Wiki [1] and the according patch is > available as a Pull Request [2]. > > Vote will be open for two weeks, counting from today. >
I think the idea of this RFC is nice but it needs a bit more work to make it really good and successful. See some of the notes below and more technical ones in the patch. I think it would be good not to rush it but have it for 7.1 with more time to develop it to maturity. Reading the RFC, I'm not sure I fully understand what is the difference between E_HOOK_LOG, E_HOOK_DISPLAY and E_HOOK_PROCESS. The code just calls all of them in a sequence. What is the difference between them and when I use each of them? Especially not clear about E_HOOK_PROCESS - why I need it if I could just hook one of the other ones and do whatever I need to process the error? Also, there seems to be no link between E_HOOK_LOG and PG(log_errors) and E_HOOK_DISPLAY and PG(display_errors), so these will be called even if log/display globals set to disabled. So the code that implements something like custom error display would have to copy checks from PHP core code if they want the custom error not appear when display_errors is off (which they may want to I assume). If you override bailout callback and request bailout, then the bailout would happen, but nothing in zend_error_bailout_cb() would - i.e. no error code setting, no HTTP response code, etc. Also, zend_error_bailout_cb() actually calls zend_bailout(), so it is not clear - should the bailout hook call zend_bailout() or return FAILURE? The comment in the code of php_error_cb() says "hook_result == FAILURE means we must bail out" but the bailout does not actually happen there. Moreover, it is not clear when bailout hook is supposed to return FAILURE at all. Also, I see a lot of php_get_module_initialized() checks inside the specific handlers - but if an extension overrides it, these checks are not performed, so the extension may still work with uninitialized data, which would be not good. Of course, extension writer can copy-paste all these checks but it's easy to forget and if they ever change it would also be easy to forget to update it. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php