Re: [RFC] Enable error_handler callback parameters to be passed by reference

From: Date: Thu, 29 Jan 2015 07:55:03 +0000
Subject: Re: [RFC] Enable error_handler callback parameters to be passed by reference
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-81357@lists.php.net to get a copy of this message
I think you mean: function myErrorHandler( int $errno , string $errstr [, string $errfile [, int $errline [, array $errcontext [, string &$extra_errstr ]]]] ) We have these empty-call-filled-on-return parameters in preg_match(...$match) but I am not sure if it makes things more complicated than they should be. For me, changing $errstr to &$errstr is the simplest thing to do. Regards Thomas Yasuo Ohgaki wrote on 29.01.2015 03:55: > > Hi Thomas, > > > On Thu, Jan 29, 2015 at 11:51 AM, Yasuo Ohgaki <yohgaki@ohgaki.net > <mailto:yohgaki@ohgaki.net> > wrote: >> >> If there are many people concerns to change error message, how about >> >> append user error message to original error message when it's changed? > > > How about this signature. > > > function myErrorHandler($errno, $errstr, $errfile, $errline, &$extra_errstr) > > > Regards, > > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net <mailto:yohgaki@ohgaki.net> > >

« previous php.internals (#81357) next »