error_log() is a good point. In the future, set_error_handler() might be
changed to be called multiple times with different custom error handlers,
similar to how register_shutdown_function() and spl_autoload_register() act on
multiple calls.
Having a chain of error handlers appending data to
Hi Dan,
On Fri, Jan 30, 2015 at 6:38 PM, Dan Ackroyd dan...@basereality.com wrote:
On 21 January 2015 at 04:39, Thomas Bley ma...@thomasbley.de wrote:
In userland it is sometimes necessary to extend PHP's notices/warnings
with additional information (e.g. username from session, stack trace,
Hi Dan,
On Fri, Jan 30, 2015 at 6:38 PM, Dan Ackroyd dan...@basereality.com wrote:
Why can't you just use in the error handler function to write the
exact message you want?
http://php.net/manual/en/function.error-log.php
Forgot to mention important part.
It's perfectly valid to use
On 21 January 2015 at 04:39, Thomas Bley ma...@thomasbley.de wrote:
In userland it is sometimes necessary to extend PHP's notices/warnings with
additional information (e.g. username from session, stack trace, etc.)
Why can't you just use in the error handler function to write the
exact message
function myErrorHandler($errno, $errstr, $errfile, $errline) {...}
It would be awesome to also pass $errfile and $errline by reference. This
would allow mapping compiled source to real source code and have
meaningful error file+line information.
By compiled, I mean e.g. inlined classes (like
Yeah, seem other want it it too, so I just updated the PR to allow the
first four parameters been passed by reference.
On 23 January 2015 at 16:23, Nicolas Grekas nicolas.grekas+...@gmail.com
wrote:
function myErrorHandler($errno, $errstr, $errfile, $errline) {...}
It would be awesome to
Hi Thomas,
On Wed, Jan 21, 2015 at 1:39 PM, Thomas Bley ma...@thomasbley.de wrote:
In userland it is sometimes necessary to extend PHP's notices/warnings
with additional information (e.g. username from session, stack trace, etc.)
I'm proposing to enable error_handler callback parameters to be
I like the idea, we have the similar scenario, we need to print request log
id to the log,
so I just made a PR to implement this:
https://github.com/php/php-src/pull/1018 the PR is against master,
but I think this could also been in 5.5.
On 22 January 2015 at 18:41, Yasuo Ohgaki
Thanks I'll draft a RFC during the weekend.
Regards
Thomas
reeze wrote on 22.01.2015 17:01:
I like the idea, we have the similar scenario, we need to print request log
id to the log,
so I just made a PR to implement this:
https://github.com/php/php-src/pull/1018