Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112987 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59311 invoked from network); 25 Jan 2021 16:29:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Jan 2021 16:29:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE3D91804E2 for ; Mon, 25 Jan 2021 08:10:24 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 25 Jan 2021 08:10:24 -0800 (PST) Received: by mail-ot1-f52.google.com with SMTP id i20so13234910otl.7 for ; Mon, 25 Jan 2021 08:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eUKne7FDGUaO82XJtJ16IS/4MY2HDDbX8gvEhYmi3ck=; b=Le6yeUut3SVG0XvOJ5J776nPtnldDEu4phFidIS6f8PfIaz4ZEZI3G+RXMBtykglct HFTjCpLYFMcRvMGjF7O/A3pwAFcyLkJinvzisNlIjjXEfuT8EatQrb7yFgadGq8MXoLn PEtUHoOAoOSOFmOMP5jPgczoYGWB3oH/2JbUUAJCzehvYT7sPzcrmzSzbapxMbxacvD5 UUau/9DIzDRhblZer7nLPlLxJe+za/IDGhijY3uLoxXxNJjN5cb9mnJfT9fsFNwLp8ee GEYRIlG2wqp1mPzCDok5LQev/cuqj6uaUy5ZT3JWBW/Z8v8c2qWQF8ZsU1q7rRfwGmDC 9sgg== 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=eUKne7FDGUaO82XJtJ16IS/4MY2HDDbX8gvEhYmi3ck=; b=TAplhnumflhGY/LNInxO9+Dkql9IfR3R45C/6vu62zR7V8S2E/qFo43q5GFSHaiOjw 3iNFndBmykG0sa8/wU6r55UYGysTo8Np3mxDSuwUkBsLrQT7GN1wyHUGt4tqrR41pNLS Wl7q8r0QegrnmLKZmGXC9GWaxffAJpKG5+3o1VBDMgAGJUtngU2krxhjQEPTtCzlzlXy tPPRiR28i9eVbL2C+PPvE5U3GZIVO6kRknRUD2Td4nt8jF/0uEFCSIGTDfAVztzF7C5t d6I1JWOJ5SoMyXlCynmqPDm88fBBK0H/jBFG8tKg27ycqGCcvhlzvJDy8RUtguyI6oAO xIRw== X-Gm-Message-State: AOAM530wlPRYWSttwhtkmeHxAh9gWJonrJt1spmGW4ZfJC1NzWW6KXBy joJXYpxbHPr5mb8S544rKoKo/foZAsJt3F+xRUQ= X-Google-Smtp-Source: ABdhPJz+fZ64k5sWJsZFYlLL8c735qU9Q8qJYeDl8dlxre4xs/jVU7w5xX5jElD9b81nwHtb8WGeBsUbgjD7Go6Rl38= X-Received: by 2002:a05:6830:3152:: with SMTP id c18mr918196ots.191.1611591021188; Mon, 25 Jan 2021 08:10:21 -0800 (PST) MIME-Version: 1.0 References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> In-Reply-To: Date: Mon, 25 Jan 2021 17:10:10 +0100 Message-ID: To: "G. P. B." Cc: Christian Schneider , Kamil Tekiela , PHP internals Content-Type: multipart/alternative; boundary="000000000000575a2b05b9bbc62d" Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000575a2b05b9bbc62d Content-Type: text/plain; charset="UTF-8" > > Moreover, I'd rather we get rid of the warning modes all together as they > make the least sense to me. > Either you're handling the failures explicitly anyway and you use the > silent mode, or you don't and want it to throw with the exception mode. > The warning mode is literally the worst of both worlds, it doesn't fail on > failure so you need to check for failure manually, > and you need to suppress the warnings because otherwise you get false > negatives. > > Best regards, > > George P. Banyard > I'd just like to say amen to that. Please move as much code as possible to throwing exceptions, and get rid of warnings. Most of the time when a warning is thrown in PHP, what you actually want is to deal with it, or stop execution. - Benjamin --000000000000575a2b05b9bbc62d--