Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105683 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63376 invoked from network); 12 May 2019 20:01:21 -0000 Received: from unknown (HELO mail-pf1-f182.google.com) (209.85.210.182) by pb1.pair.com with SMTP; 12 May 2019 20:01:21 -0000 Received: by mail-pf1-f182.google.com with SMTP id z26so5860161pfg.6 for ; Sun, 12 May 2019 10:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kYrLFIz8zYUvToBcuUtI2mZZsMJaqjvIlihrFdrrUFI=; b=J+oegMJVVIuDxeX2DiEFNIlvmejqgo1g8PpgsPuP4yK4jZdUeu6LhREY/RY3PniHJR NSKIqmePHqyTm6N3h1QLH+UgOuq75EOdTgAZ/0mI6skOgUATEcxtR9rxR5nG9fYtIqM7 ATdb7R0wsAXzmybyUtNFkV8ayVgxO5wFfwth1c8my4DiVPBO0v4wOP5fV9CLuCR83QB0 aUjueozxRZiPSAXuZYWFdGd/sgDRjX+ZReLF3Ne48afQ49zMRceUMzT4HEuAM4Ipx34c 3+gqi1fWfQ2a/D+88pTRiuWpquA5CfoWx6zoZOJLGXuNFwgZEc4vyVc9k/dCIt7i019r HT7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kYrLFIz8zYUvToBcuUtI2mZZsMJaqjvIlihrFdrrUFI=; b=P4tnAnfXlvNxCzfJwLHIXLUh8GfMwVN/3G1EcjTbX5WPIbTjp5bpRDoEJTJUxnKjty YqAGpRMQNakrDwduPmLsPhy/mWN4YEjxtWnqDBET6HSigkqUU+rfZtmy86xdbwWOdyH7 acQPc6GK49QfBgULsy6rD9sWhdJPtXtUWfi+0bgxDUZfHcss3S+kNLvg/dR91WCQdzcI 29/zBb8foTU4yC5MUnflblIMZKiSuwldz5QH4hFKPem8esGoMETIt691IXa+OyAachxE 44Q4BfjQ0KgJwJ2CvCP63hxAnzu0kLoqbJCpFSe2yz6yGm4qKxS2zLThTjBbWgO9ie6S 7d8w== X-Gm-Message-State: APjAAAUhvC7y3GIvV0lLHBD1LjMrQw5KfOtcc9qUNXYXK+tl0jRd6A87 9RDOi4mSd/NqYOQJ1W/fTsT9YKrqR9EJ4Dz3Q60hudjyWVE= X-Google-Smtp-Source: APXvYqy4msirwriWfhHo8lW5y2sxQDSWXm4kGhFbl8fJo/kzgySHJpghYTZoHP4pNB8zBeLucKu8pPKklbCxKYrFOb0= X-Received: by 2002:a62:6c88:: with SMTP id h130mr28056672pfc.106.1557680792286; Sun, 12 May 2019 10:06:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 12 May 2019 18:06:19 +0100 Message-ID: To: Bishop Bettini Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] JSON_THROW_ON_ERROR implementation detail From: Danack@basereality.com (Dan Ackroyd) On Fri, 10 May 2019 at 15:42, Bishop Bettini wrote: > > Extant 7.3 code might be: People would only write code like that if they hadn't read the manual (or code documentation in their IDE) for json_last_error() which clearly states 'Returns the last error (if any) occurred during the last JSON encoding/decoding,'. > I'd rather we just raise awareness in the form of documentation If you have to carefully read the documentation for function, and not taking enough care means that you're going to be surprised by the result, then the function is probably poorly designed. > We chose one, with its pros and cons. As we've seen recently, people don't always consider the exact detail implications that deeply. Seeing as people can also just make wrong choices, I think this should be changed. Seeing as you've objected, I'll raise an RFC to put it to a vote. cheers Dan Ack