Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104937 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45713 invoked from network); 25 Mar 2019 18:32:18 -0000 Received: from unknown (HELO mail-it1-f171.google.com) (209.85.166.171) by pb1.pair.com with SMTP; 25 Mar 2019 18:32:18 -0000 Received: by mail-it1-f171.google.com with SMTP id w15so14588828itc.0 for ; Mon, 25 Mar 2019 08:25:28 -0700 (PDT) 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; bh=s92o4xOqvB2bYNJexaDzULS1/SVZf/w9yzwbQATPaUU=; b=EgHWYbUVu5qOP71DExMDPdkIfucK3EoyYCWAmLGRevQHssjVGS6ZV6VKqYjiGw3H0E vheJFnbX89ixra8iB6YJdehbgPMcHJuB7XVGOjmuEOU0JNMjTh+KYj3VIxsY3wiFeB5U PIqRGCGCQTCtDyw6VSI5dGzJ8kSCl3sdz4mIsAplEvrKdVG+jUw1TWuF/CuubWcOTZwE RHwf28XHq1bKUipdrWXCkqfO30kkQDPB4ubGYUK8YIJbDXY3CSSmFdtGjeEOSScm0aCx IOiwgLe/8QLbAp/84M4yEHLQd/Y82/8rRmUZSiqCkuaSCN3wLG/r8adKWCaC4HFBFYX+ QTLQ== 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; bh=s92o4xOqvB2bYNJexaDzULS1/SVZf/w9yzwbQATPaUU=; b=bqNmG9CaYJIR7nXYVMAK7hEIn5woYwlUjOjEIS8xe7TnnBC1Ko6vXiF0VJPWxWU9b9 WzKgz65i8bQRzj+mMPyB9axiY2F1AP31cfyo01eTiGUs/QO56HdL7tNdFmxYVTVw+t0u aNCIels0577o4XBhBOM4oe+cYcqDoI7zRVIG4AAJfXqD5XGKGXKI6VZ+xaoELKar0PYs G/EhsLfkBZTV6WD7aPIoTDOHE/2X3CeDDSwSNjOP+w4RaRiHILKHhiEooOBqARR8w5/R QtWjiQeeEqP/izsmkYHdGLuItp8wJkLXqD0FYEwvct24KgNuk/b0EvOUX7so6qzZJV1C KduQ== X-Gm-Message-State: APjAAAXuKndEP9Lsq1kvuFBUvPjL5XnmuTP4A0vOgLRh26ewG9pJDWWW KiSdnR7el3YsANXa/ORI0HibTmyLXzGL4p3moDl6Ag== X-Google-Smtp-Source: APXvYqwL0+6lhHDq6hyRxNDyUYir3heqcekyZ/2Q3SQHgos0jJ4bwtTOIBv1Nozxz3M7X+sAlIiF8f61WIjU9ovjnFc= X-Received: by 2002:a24:164d:: with SMTP id a74mr10962352ita.84.1553527527961; Mon, 25 Mar 2019 08:25:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 25 Mar 2019 15:25:16 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000073f7420584ecd0bd" Subject: Re: [PHP-DEV] bool values and increment operators? From: rowan.collins@gmail.com (Rowan Collins) --00000000000073f7420584ecd0bd Content-Type: text/plain; charset="UTF-8" On Mon, 25 Mar 2019 at 15:03, Christian Schneider wrote: > The documentation has a highlighted box stating > "Note: The increment/decrement operators only affect numbers and strings. > Arrays, objects and resources are not affected. Decrementing NULL values > has no effect too, but incrementing them results in 1." > The NULL part of that has always baffled me. Why should ++ not be symmetrical with -- here? In general, documenting what we currently do is great, but is separate from agreeing that it's what we *should* do. Regards, -- Rowan Collins [IMSoP] --00000000000073f7420584ecd0bd--