Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118485 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28563 invoked from network); 26 Aug 2022 06:17:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2022 06:17:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 878D4180384 for ; Thu, 25 Aug 2022 23:17:33 -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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS63949 74.207.252.0/24 X-Spam-Virus: No X-Envelope-From: Received: from malamute.woofle.net (woofle.net [74.207.252.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 25 Aug 2022 23:17:33 -0700 (PDT) Received: by malamute.woofle.net (Postfix) with ESMTPSA id C70641F0CD; Thu, 25 Aug 2022 23:17:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) In-Reply-To: Date: Thu, 25 Aug 2022 23:17:31 -0700 Cc: David Gebler , juan carlos morales , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <8D53AD5B-7CFC-4820-9EE4-FEB365D327A8@woofle.net> References: To: =?utf-8?Q?Micha=C5=82_Marcin_Brzuchalski?= X-Mailer: Apple Mail (2.3696.120.41.1.1) Subject: Re: [PHP-DEV] RFC json_validate() - status: Under Discussion From: dusk@woofle.net (Dusk) On Aug 25, 2022, at 21:47, Micha=C5=82 Marcin Brzuchalski = wrote: > The same goes here and I'm not convinced we should introduce next = small function that can be simply implemented in user land. What "simple implementation in userland" do you have in mind? Can you = provide an example? json_decode() is not an acceptable substitute here -- as David Gebler = has observed, decoding a large JSON structure can have a significant = impact on memory usage, even if the data is immediately discarded. Any = implementation based on string processing, on the other hand, is likely = to be dramatically slower, and may have subtle differences in behavior = from PHP's JSON parser.=