Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108799 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38588 invoked from network); 1 Mar 2020 23:04:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Mar 2020 23:04:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1AAC41804DD for ; Sun, 1 Mar 2020 13:23:43 -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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 ; Sun, 1 Mar 2020 13:23:42 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id 6so568356wmi.5 for ; Sun, 01 Mar 2020 13:23:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=JIczhg9bnDWlazH+SRoPfyeJi30vFmwWZoiOVi8HOqo=; b=EwbiNKFS4J7Rfh+GDMHI+rs4XcveAcTyWISVFibJZLM62Pz7CC7GQHBN2aagQNzORE +0BhzzLZyd/pt5WQM4/Sb4nqgTZOKC/xrun+MIH87KN68XMRo5k/RkemEsAQxHslWeSV Dj8S8wSujGfgHRHmkQ0jAB7u1r+6IHgvoxOvyzDAzQTDApuUUdBmmAwA4SplX4Lta9Tz 75NBQz3ZtFDx3J3IePoM2EppZHEcyr+kX/bdghDptSMNWpEEsBqSzcw5HlOY7ZWM+hDj M/8zHn0SOeR4mkc7g9Ya9BkaFG8fbbUwPiZ87Qg20fuStc9EywE7S+C5PzfwOnYsHx6n lSJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=JIczhg9bnDWlazH+SRoPfyeJi30vFmwWZoiOVi8HOqo=; b=fDjLsaNbWPyamyGD9KEkOpyklNw2TwpR7waJ8WAGohH1PKqRZ7a9T/iLqOaz4f/FEK AKkkM4jaztrePCil2bxVz2w4c2tnbY8svagMj+4DMcZ3n1LOgAKgNMI1AJsd0ZV04IR8 bk3yep6UQZ5B24M9OuFTixiFwZiV7/bz/S0zOlyugMEWjMS7C6pb/JQO9AXu+hGxgreU btq7Pp5jC8qlzgUA03UzFAv/Ei2x58QNdB02VOOpUO7mGjmJPBVdSJ30a30wHDFSxOCp kUKgh44rqroLWUtONILim7lBsp2nMq1ne73VQNq2XlYzSE1sb07KMdnOleeZbZS7VeKX EMvw== X-Gm-Message-State: APjAAAU3sJo9OPRRmASIl/kahiVQuVt1hyD3O+cReQwGlgdjNuU0kfgO 0kGt66vWxW88omSShpRbgMEBRPu4 X-Google-Smtp-Source: APXvYqyRwROZCPjt068rbAXP49+BaUlunl42JTs3Ck823m0uIrGStH1iRM7tjnBizbriTzNFsjuN2g== X-Received: by 2002:a7b:c05a:: with SMTP id u26mr15533773wmc.74.1583097820316; Sun, 01 Mar 2020 13:23:40 -0800 (PST) Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id z9sm11312949wrh.91.2020.03.01.13.23.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Mar 2020 13:23:39 -0800 (PST) To: PHP Internals Message-ID: <3f615d82-a84b-697b-5c02-8d915270f92c@gmail.com> Date: Sun, 1 Mar 2020 21:23:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: [RFC] Increment/Decrement Fixes From: rowan.collins@gmail.com (Rowan Tommins) Hi all, Following my thread a couple of weeks ago, I would like to put forward an RFC to fix some inconsistencies with the behaviour of the ++ and -- operators: https://wiki.php.net/rfc/increment_decrement_fixes Note that this RFC focusses on three specific cases which I think could be considered bugs, but require breaking compatibility: 1) Bring the behaviour of decrementing null in line with subtracting 1 (and with the equivalent increment operator) 2) Bring the behaviour of incrementing or decrementing true and false in line with adding or subtracting 1 3) Throw the same error when incrementing or decrementing an array as when adding or subtracting 1 I believe the behaviour of strings, objects, and resources, each raise sufficient extra questions that they should be left to future RFCs where we can focus on each in more detail. Please read the RFC for more detail on what is and isn't proposed. Regards, -- Rowan Tommins (né Collins) [IMSoP]