Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99862 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85001 invoked from network); 12 Jul 2017 18:00:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jul 2017 18:00:20 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.177 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.177 mail-pf0-f177.google.com Received: from [209.85.192.177] ([209.85.192.177:35260] helo=mail-pf0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/39-01782-2B366695 for ; Wed, 12 Jul 2017 14:00:18 -0400 Received: by mail-pf0-f177.google.com with SMTP id c73so16562537pfk.2 for ; Wed, 12 Jul 2017 11:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=iwt2yWNN64SD+rIJ0A4qf1QB2T+IxxUq5JdsoGCwITQ=; b=cB/X+p6iMJYD0/LjUeLR3xxxClOPkkZ2XLKfVr5DpatACh7vC8gmp4JmxY43pQbSos vU6wPid/sG7LL2Y3lFgEWTYkczJVafls0JH+FTATkg9SR1O+R2cdHcjcE7MStTfaIKnl z75gC9SyvTr7k56VUY4YhT5SS8QSIVTb0gqBE9JDJk1oIcRGjZMWPx9BpaCZutPDaPe3 FW9exEGbPlecfxAuSDm4V7izrsN53SlmpAAqF2p8xSWzwfF37V+OFdcFt1S05/qs0LN1 /aYf3uida37pGpnXIK7UIZ6M5u9vVKBX4thS4K9B2FSLJbGSTOqx/7s4GEFQ65BWRDBL WIeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iwt2yWNN64SD+rIJ0A4qf1QB2T+IxxUq5JdsoGCwITQ=; b=oUIF6d3X0Uoo9Y+Vsaa3lZPH+WuWoICbGIjbI8oUC1ol4iEovwQEZCWha0yKJQ0FNw twPvl1HTV9SASYXsgNME6qgw7wsGxbNq+/y8t6QDhX6SIGBN6/Yt375QO2NO25pzxsj7 QkyUbo/ApTxnq9ntULO0uHClsw9KeeoN14pmFaQK4LXEVZowTor0Cu5SNJHOif5QaduV QqZg2J2+Xz41hGWFy3VniKhEFj3wYj5rMZ2Bdlm5sYGiLeVSwTV2fXrP3+5IuOZE643i qaPM4VcO58d23aX3O/FMu0p5Y4EPY9V/7ln8/OSnU9xVS/iDKMs54NVLxir8ZaOTdLoz twxw== X-Gm-Message-State: AIVw111mNAHPxyEvEleTr18SO38QWrt0Hkbz+N7u5F997UqtYZy5XDoU A+Fq4LVwxjZv03BQBuA= X-Received: by 10.84.130.46 with SMTP id 43mr5567949plc.128.1499882414643; Wed, 12 Jul 2017 11:00:14 -0700 (PDT) Received: from Stas-Air.lan (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id m68sm6521826pfi.12.2017.07.12.11.00.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jul 2017 11:00:13 -0700 (PDT) To: Mark Shust , internals@lists.php.net References: Message-ID: Date: Wed, 12 Jul 2017 11:00:12 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] array coalesce operator concept From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Code will error if a non-array value is passed through a looping feature. > For example, this code: > > > $foo = "abc"; > > foreach ($foo as $bar) { Looks like $foo??[] would work here. If $foo is something like false or null, that is. If it's not, this is probably a serious bug (why would you iterate on something that is a number or a non-iterable object) and should be either fixed or resolved explicitly, not hidden. -- Stas Malyshev smalyshev@gmail.com