Re: New PCRE function

From: Date: Wed, 19 Feb 2020 16:50:20 +0000
Subject: Re: New PCRE function
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-108674@lists.php.net to get a copy of this message
> On Feb 19, 2020, at 10:33 AM, Nico Oelgart <nicoswd@gmail.com> wrote: > > On Wed, Feb 19, 2020 at 4:20 PM David Rodrigues <david.proweb@gmail.com> > wrote: > >> Maybe you can set all this messages as lowercase? That way we can use it >> more easily. If we need the first letter in capital letters we can use >> ucfirst(), because the opposite is more complicated (a >> strtolower() >> would "break" the "JIT" message, for example). >> > > Hi David! > > I'm not sure how this would be more useful, plus all other built-in > functions like > json_last_error_msg() don't return all-lowercase strings either. > > I'd prefer it to be consistent with the rest of functions. I agree with David. Lowercase is best. I am however influenced by Go which specifies that all error messages should be lowercased for the exact reason that David suggests. Consistency is nice, but I would argue it is not great when it means not being able to adopt emerging better practices. #jmtcw -Mike

« previous php.internals (#108674) next »