Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107680 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31102 invoked from network); 25 Oct 2019 01:37:43 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 25 Oct 2019 01:37:43 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 1309E2D1FE8 for ; Thu, 24 Oct 2019 16:24:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 24 Oct 2019 16:24:12 -0700 (PDT) Received: by mail-qt1-f195.google.com with SMTP id o49so486273qta.7 for ; Thu, 24 Oct 2019 16:24:12 -0700 (PDT) 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=ZUJmU2f9cJ9LZ5WD81c4iuMTlLnRKVCZ2GKANofGe50=; b=cE4L6gSWCbfZZhYX2MrIjWL+jcCDnT+skwXiyamEOLz785s4cwxGkNwi34g14QbwL9 BqtWLri7hrlWuZ7ZIWs3HvO+PYx5ONp1sQHWYDSSQdsPSh2TtcXgyqHpvTEUvc7LBSuX Bb8ULn2UZC1ISRY/Gy9lLImJrqxQ4FjoV4ZC1krxh0Y7JgF555gs+JnrtjjJQGjNneCL eWrdcNR8e4oQu/6RGaCZKqfVdHF1kqaq6+zOTgy9uTdDFaFgR+JzI1Z+BVG/5gfesCRC NS9FAOWqbKhGoitg3Ra0ZiT9TQz25Os4SA3RPJoVrCJbc3W8BSWu953TGwt4F1jEcU+4 9PcA== X-Gm-Message-State: APjAAAWIr1J4jsuPiN7p+4EPT0IDTsmPKyPTN2v/i8j8IGDwEf2BThuw C/aDZtPCeyjf9G+vRX3z66bl1lhJ3RgbKuRgndRXeA== X-Google-Smtp-Source: APXvYqwJECd90AkwpKgUcMv/+BGrwlOM5u/P2lSsEO4jICoNc9mPEfenGCF96OtEMf/8x0tPRGEGcIEZFrvGrv8SfkI= X-Received: by 2002:ac8:1c5a:: with SMTP id j26mr206742qtk.351.1571959451581; Thu, 24 Oct 2019 16:24:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 24 Oct 2019 18:23:52 -0500 Message-ID: To: Ken Stanley Cc: Kosit Supanyo , Bruce Weirdan , PHP internals Content-Type: multipart/alternative; boundary="000000000000b69a530595b054ff" X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] anti-coalescing-operator From: pollita@php.net (Sara Golemon) --000000000000b69a530595b054ff Content-Type: text/plain; charset="UTF-8" On Thu, Oct 24, 2019 at 4:55 PM Ken Stanley wrote: > > isset($_SERVER['fname']) && $user->setName($_SERVER['fname']); > > > > Will return boolean. > > > > Just testing the waters: Is there any appetite to have AND and OR behave more like Pythons operator? Instead of now: (a or b) => bool(true) if either of a or b are true (a and b) => bool(true) is either of a or b are true Behave as: (a or b) => Value of a if true, b if a is not true but b is, bool(false) otherwise. (a and b) => Value of b if both are true, bool(false) otherwise. Coincidentally, this change to T_LOGICAL_AND would server OP's purpose. I'll tell ya, I'm leaning "No" because BC, but at the same time, AND/OR seem to be underutilized constructs and I *suspect* (having done zero research), that most existing uses would yield the same result as they do now. -Sara --000000000000b69a530595b054ff--