Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106056 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93571 invoked from network); 25 Jun 2019 23:11:01 -0000 Received: from unknown (HELO mail-oi1-f176.google.com) (209.85.167.176) by pb1.pair.com with SMTP; 25 Jun 2019 23:11:01 -0000 Received: by mail-oi1-f176.google.com with SMTP id a127so168214oii.2 for ; Tue, 25 Jun 2019 13:27:15 -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 :cc; bh=drwbzq54tm7iq3riE8SW9v5oz8BD63GDS2AMOFJuS3k=; b=cgFjJcOy7+i8viU8e20U3AeX4QDbzsWuj97jEclBlV/XbZcNrPO0taGk3GqWkJP6wY U5p9tfh6sPLB46LNA7vrr8nC53NkEK5aP5x0bhnzStX+BTD0k8PW7KyDavl7zA1xF9W/ kn/Fc2RtCUN0UFYQ9qeN9C1vcsdbme0OdTmULwJDJq7qGFax3EtulioNCGVGN+8/ES9X J4uJiAZIi1cFZO85XL5gz/kwmktGwQd7gw9bpEw5ADe9l7kFPGtN8PUiiWitCF70zhAS mIYwdRLirybZGwBn8HdBuBi4rtbvMdQk6FamD7Z/4fe+rmdoP5DkavBgP9yjdY3Hk1GJ cqDg== 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=drwbzq54tm7iq3riE8SW9v5oz8BD63GDS2AMOFJuS3k=; b=nS9dgM5Nxc2YVc9GF9D62uIYt0Gx0VZFa7kxFKlDVA/5m07xjf3XcKhIzNBnERCIAp S78VwW/GfFvk81+7CKefxoSoG7VZvV5mZNJ9oztjlxNnT/T23oyEaMbrpM9bBbdofW0v rK2lhzlW8+ZASHHizlc/FcyHIU0lDJf5ag/MMyvXZHz9PjAJGfS2wS1kPC/NDEkyuYv9 OyLmN+zhxK9OBgfA9DVNgLe+zeq2VMCY9S7TK1bfYrVgJsLcsKhTosf2F7YxrZjX8Fi3 jj77EVb+UUuc0bbw0RafFPVQnvIaUlCJMgVcA9dXTBBhIfcmYm4jjikkavZWq/NMWaVc i00g== X-Gm-Message-State: APjAAAVcEoODp9k8BzoIbAOc+4TwuEXBycnZm/did9LG2ObUgI9cul7x yCgcLT/YJZFassZNcbb3dF6JpJfhuSqe8/sOAi8= X-Google-Smtp-Source: APXvYqzjNJZlu0cY0DUQFzzKmhqpEYj2n00gD9/WLmcsZLIBitMrwA12aB5jHSqEQ7YMhliXWH/o+oZsHbohveSPdj4= X-Received: by 2002:aca:2b13:: with SMTP id i19mr11417144oik.99.1561494435001; Tue, 25 Jun 2019 13:27:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 25 Jun 2019 22:27:03 +0200 Message-ID: To: Guilliam Xavier Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000001dfacf058c2bc1b1" Subject: Re: [PHP-DEV] [RFC] Strict operators directive From: arnold.adaniels.nl@gmail.com (Arnold Daniels) --0000000000001dfacf058c2bc1b1 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 25, 2019 at 7:56 PM Guilliam Xavier wrote: > On Tue, Jun 25, 2019 at 3:09 PM Arnold Daniels > wrote: > > > > Hi all, > > > > I would like to open the discussion for RFC: "Strict operators > directive". > > > > This RFC proposes a new directive 'strict_operators'. When enabled, > operators may cast operands to the expected type, but must comply to; > > > > * Typecasting is not based on the type of the other operand > > > > * Typecasting is not based on the value of any of the operands > > * Operators will throw a TypeError for unsupported types > > > > Reasoning; The current rules for type casting done by operators are > inconsistent and complex, which can lead to surprising results where a > statement seemingly contradicts itself. > > > > Using a directive means that backwards compatibility is guaranteed. > > > > https://wiki.php.net/rfc/strict_operators > > > > Yours, > > Arnold Daniels > > > > [Arnold Daniels - Chat @ Spike]( > https://www.spikenow.com/?ref=spike-organic-signature&_ts=1mzl6) > [1mzl6] > > Hello, thanks for the impressive work... > I have just one interrogation: why disallow `~` for strings? > (e.g. currently `~"\x00\x01\x02"` gives `"\xFF\xFE\xFD"`) > > -- > Guilliam Xavier > Using `~` for strings should be allowed. I fixed it in the RFC. Well spotted. - Arnold --0000000000001dfacf058c2bc1b1--