Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118316 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90448 invoked from network); 30 Jul 2022 04:06:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jul 2022 04:06:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9B9C418037E for ; Fri, 29 Jul 2022 23:05:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15576 212.103.64.0/19 X-Spam-Virus: No X-Envelope-From: Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 29 Jul 2022 23:05:28 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 12C75B0F for ; Sat, 30 Jul 2022 08:05:27 +0200 (CEST) Authentication-Results: ext-mx-out002.mykolab.com (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:references:content-language:subject:subject :mime-version:date:date:message-id:received:received:received; s=dkim20160331; t=1659161126; x=1660975527; bh=mLNPh86/ZkmoClVi QVEE9AcANdvGCWWHzrItJ8UM+xw=; b=QOiWaWA77Jv6hKaJJM5NPC05+xEE0C1R xC9Qbgzsip/A9E3v9peLBGz073Y1ONBBx54IXx56Jc7xCVo6iDMEeAQBxx8h7Q7e CDuJr/O23f04rEV81RCIaEL1OLJwI6/HZLq77Zr8n0ZwroLUkYJjo3VbRGQzW6QW YFzKuIENDrKx78DL4xWxFnkq0fXNW7gbuqdbcxvHsmqj0kTdQhIKZZTJCKlM8Rd2 Q7JkPYhpDmCjAiBggxkmlvxtFmDbSd2TgCPxcGf8OFotPRlPViD3SQ0YxiRbzRe4 wSGZJFwPI/Xa84SD6OBxr2C6DZ1JByC2Jz/k4jUuW7fFcNGlmpX4RR/y4EqmDaJd QEIGQeEMAajR9Xrendt7gLbrFTcja/ckwRLRXrZ3jgEEh8yLvTcQW9pvJlHVZaD+ T+2IhRdQOFYiacb5VO+HJ4atuOlKFAM4rrS+QKYk44oaKUCgJ0wXdA55tBPq4JL8 eByj6jkn/cE4hgYAS9F8pTnmq3eS6JyDSInCKf2dj8Ux6XigADbXdUVlwhA0+lfi is67yCRRj2LmmuXzPtcS2Po8Oa7u8NFipOP0F5mDQncBhz6nCTzOc7zHK275WsH6 fGG85rFX9qEl8laxL9EgoM1thNfdC9AHEBWoiKS5xqitMw1F0Ts5hG7Dut7lDyhB eqsQgQdQ6Tc= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xsj40Jo1GyNg for ; Sat, 30 Jul 2022 08:05:26 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by mx.kolabnow.com (Postfix) with ESMTPS id BF7F9821 for ; Sat, 30 Jul 2022 08:05:25 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 831623BF0 for ; Sat, 30 Jul 2022 08:05:25 +0200 (CEST) Message-ID: <0d5ad8ab-aa7a-c37c-2d26-17e6b6953b4e@alec.pl> Date: Sat, 30 Jul 2022 08:05:23 +0200 MIME-Version: 1.0 Content-Language: en-US To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC Idea - is_json - looking for feedback From: alec@alec.pl (Aleksander Machniak) On 29.07.2022 16:26, juan carlos morales wrote: > is_json(string $string): bool 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(). On the other hand maybe the function should be as simple as possible, but I'd like it to be considered. -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com