Re: json_encode() behavior for incorrectly encoded strings

From: Date: Tue, 26 Jun 2012 22:48:47 +0000
Subject: Re: json_encode() behavior for incorrectly encoded strings
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-60970@lists.php.net to get a copy of this message
On Sun, Jun 24, 2012 at 5:39 PM, Rasmus Lerdorf <rasmus@lerdorf.com> wrote: > So how about: > > mixed json_last_error ( [bool $error_string = false] ) > > Returns the last error (if any) occurred during the last JSON > encoding/decoding. By default an integer constant from the table below > is returned. If $error_string is true, an array containing both the > error constant and a string representation of the error is returned. Makes sense to me. So should I do this? Remove warnings + add string parameter for json_last_error? Nikita

« previous php.internals (#60970) next »