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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php