On Jul 29, 2022, at 23:05, Aleksander Machniak <a...@alec.pl> wrote:
> json_decode() has $depth argument, I think is_json() probably also should. 
> And I'm not sure about JSON_INVALID_UTF8_IGNORE flag.
> 
> My point is that if you use these with json_decode() you might also need to 
> use these with is_json()

How about if validation were a flag to json_decode() -- perhaps 
JSON_VALIDATE_ONLY -- which made it return a placeholder value like true 
instead of the decoded structure? (It can't return null on success; that's used 
for errors if JSON_THROW_ON_ERROR isn't set.)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to