Re: json_encode indent parameter

From: Date: Thu, 03 Jun 2021 10:49:04 +0000
Subject: Re: json_encode indent parameter
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-114706@lists.php.net to get a copy of this message
On 3-6-2021 10:00, Jordi Boggiano wrote:
I agree, but I'd make it accept a string|int much like JSON.stringify does, because that way you let people pass in tabs too, or "🚀" if that's how you want your JSON indented..
I like the idea of accepting string|int. Accepting string|int means a zval needs to be used, with the possibility to pass any type of variable (please correct me if I'm wrong here). Should the function throw an error when it receives anything other than a string|int? -- Kind regards, Timon de Groot

Thread (11 messages)

« previous php.internals (#114706) next »