Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122347 Return-Path: <6562680@gmail.com> Delivered-To: mailing list internals@lists.php.net Received: (qmail 59752 invoked from network); 8 Feb 2024 16:20:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Feb 2024 16:20:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707409254; bh=erIw0lDOfpPpu784f8CzPe6t2CuEW92s40gCOyyzNvg=; h=References:In-Reply-To:From:Date:Subject:To:From; b=bQzAOzptdml3qFejc/BDU1e3iXqbXVoDuTNWo3cZl/BsrJRKUB5Q9susqKIDS8fhj qyepZKRNyiUXwanEVZmKC1vzyTF1mGDLzaZO8CpY0wF8t/1ipLXly7nKCcsaMWEyXZ IAzVHaz7bULolDLeMpUJagmND2pYZijn5p3nMzacrO5UxuUq4SzB9DLj2dmapNJBr1 XWGxlu0otVZWsw7UeGPO8v1qmuZl2ccSGGnsacjzuBQYvpeZWneIxvgxZ8btadY8Of GeTbexFeJl6WnMkYl6qMfKz4rclboQi5i9WRRXDHMRSOlwF/hbqvy1uM4zsFzO7rTe /qvv90s+a9k/A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F2794180064 for ; Thu, 8 Feb 2024 08:20:52 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: <6562680@gmail.com> Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 8 Feb 2024 08:20:52 -0800 (PST) Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-59a31c14100so148eaf.0 for ; Thu, 08 Feb 2024 08:19:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707409198; x=1708013998; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=erIw0lDOfpPpu784f8CzPe6t2CuEW92s40gCOyyzNvg=; b=LqVsLERgIcJd7TCbzCasqtSuge2+2ZfFnnPsUSwq2K93ZteKU282UX5g9LsJaMUEU+ J9QzW9NpFz0mFuYeQpn0oRbGrD9OAeQ8HE/cdgje3jQw/SuOftGz18tFR5vmfbeFZm/S 7D4SPU3dDDiHTgDi1lBVamPrkXBVssd9uLD9BjeWEu25tY6HQCF3QurrF0+hv6Q/RLkt ZwqSLwCLFgXOWghD7BOlWAEFaWj3rOC0haRWOvVlxL5oVha2iN9zGWMXeYRS7y9DmJKN nhETBS6bKDN0c3Rnuy5OOesw/pjxbnSnWunGe7tgfp6l1Deu0UFrNHCJf+Num/1OFrRM dRPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707409198; x=1708013998; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=erIw0lDOfpPpu784f8CzPe6t2CuEW92s40gCOyyzNvg=; b=WFM+63n0fCWMsLd0G004fvj7Nm0B6crq7kaUB8ZDtbjC2AKavgS4LGMEAzNGliFf7Z Pnj7XnMWbgeQDwo/f+CR9Qyk9XkYy4pH13nK5m0TTcGcaKjgQzJqEBRU1JdvX5smU2Pd GpYe0DAokjXqZYgYrQxoqVKrJe0Nwlg5xF/gTGQcmirYu6QknqVD219KLwXCjDUG+0wi LpDkYXfOUDmi/SACJAmhh9pHr1KsK6BQTSzEzO7KhwXDaKLA17evG56r4phl9baIazlO xs4SfAWc+uO/ph7J10uVj7phSHOiLYJ4YumefwnMxiIupYyWsK7d3DAlDZ2JrLkCccRW yMnQ== X-Gm-Message-State: AOJu0Yy6Tx4HY5u1zGLpg1nVRuv7P9HEXSinAnpT0DU79j4M81Pd3PHA BMXF6Gm/tyQ6h9iD9lbLKVVm7d2VSYqOY/LK6o38LPypycOqGpnEQanGNqkd8IQLO3C9GwTb1yf INqcPnEW8nIlqC85wvuSQnXnVoYLACtskVW/6KQ== X-Google-Smtp-Source: AGHT+IEj2UiRlFNNcoMan+pl4tUk31zOjGKcAR4DEpLnLzatAOmLNLTSpdiiaw7RrNhpNkP5EIA0Px4OtgqsDPRUZ7A= X-Received: by 2002:a4a:3c46:0:b0:59a:e669:a37c with SMTP id p6-20020a4a3c46000000b0059ae669a37cmr47715oof.1.1707409198533; Thu, 08 Feb 2024 08:19:58 -0800 (PST) MIME-Version: 1.0 References: <742f202d-7990-4f51-b903-7a15e3fd33c2@app.fastmail.com> <1cd8fa7b-ab62-4563-bf13-bb7801f1ce8d@app.fastmail.com> <90cc47f7-ba80-4798-8447-2f3bb5734eab@app.fastmail.com> In-Reply-To: <90cc47f7-ba80-4798-8447-2f3bb5734eab@app.fastmail.com> =?UTF-8?B?Yg==?= <6562680@gmail.com> Date: Thu, 8 Feb 2024 19:19:21 +0300 Message-ID: To: Larry Garfield , internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000c3dcb60610e12e69" Subject: Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301 From: 6562680@gmail.com (=?UTF-8?B?0JPRgNC40LPQvtGA0LjQuSBTZW5pb3IgUEhQIC8g0KDQsNC30YDQsNCx0L7RgtGH0LjQuiBXZQ==?==?UTF-8?B?Yg==?=) --000000000000c3dcb60610e12e69 Content-Type: text/plain; charset="UTF-8" From that point of view you're absolutely correct. I want to use json_last_error() with global state, but with the ability to manually change the state size to prevent memory overflow. So I suggested it because the count of bad code will grow in arithmetic progression because of the times on the Earth - firing out developers who "know the truth", hiring cheap developers who "just do". You could believe in correctness or help people who need that help. I understand that php spent many years on fast solutions, and btw, I am glad to write code with PHP, even with older versions >5.6 / >7.2, because there's exactly catched balance between "all possible" and "you need to". This `raise` is a case that will be required until somebody changes the business world. But business never changes, in the last 30 years it has become more "predatory" and unscrupulous. Getting back to the error handling problem - still no solution about "exceptions coming to warnings being called in batches/pipes/bulks" and no solution for "each exception could cause time loss on big amounts of incoming data". If you aren't gonna implement `raise` keyword (or other way like that) - at least one thing could be implemented easily - collecting error traces only if it is required, some mark, or flag, if you don't want to implement different interface that won't break/collapse the code, at least by honored SOLID separate responsibility of trace collection and error raising, to reduce timelosses. I mean - allow the developer to throw an error that just stops the code with a message, doing that the fastest way possible. Otherwise, I understand the point, and have nothing to add here. --000000000000c3dcb60610e12e69--