Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103001 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61794 invoked from network); 31 Jul 2018 22:58:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2018 22:58:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=david.proweb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=david.proweb@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.43 as permitted sender) X-PHP-List-Original-Sender: david.proweb@gmail.com X-Host-Fingerprint: 209.85.214.43 mail-it0-f43.google.com Received: from [209.85.214.43] ([209.85.214.43:55847] helo=mail-it0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/E8-14835-F89E06B5 for ; Tue, 31 Jul 2018 18:58:24 -0400 Received: by mail-it0-f43.google.com with SMTP id p7-v6so6960624itf.5 for ; Tue, 31 Jul 2018 15:58:23 -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=d73D65MVA/sM97jPtliMjxI9jj8AZAOW0oPwJmAyghQ=; b=bSp+WAwXW1zCeOjOhh/C0bxYWs3u4DYvvAhnbZMnYyL2K9L6K5ZIe4aXu4SsY1r2E/ tIKKIoneSUUZrl0ejGZYJBcMvNbQXlMVIfFZWBWCppRPk1Zo1jk7d4TxFq3lO2StiXTv pGBpsfZZBCgDzTK30rZjxMsqirJqAbi9a9KyR0j4vi2WTDSUcSUrKmC41OnZlhM862ej 2AzfJgHp3FSNG3e20QJIWNJRn9Ga+eDj+PpQiCgRtswDHPKHZA+3yeCYvNhWPZMFhKFf uauNXjW+IN8YhPnzHecdFQftE/ofagPeQaskmhcpYK982AW1hZcUEgpIPQDgw/Vk701l aYUw== 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=d73D65MVA/sM97jPtliMjxI9jj8AZAOW0oPwJmAyghQ=; b=BcmxrXVJuQYkdPwrpZkY+n/MUFEQAhqUcsKTDtlRjNcaMqNYEO9YHMnfifZg+S7WIT mHpvRtQ4teCqsWLC/HS7FdqcGsTRX8s2CQDZzR4jmbcpzJHN3iXqN7V1uEePO5R3QVho KNpP+eK7G1tPD7fHDixUHLI2aIZESaEKEbj0D46ZLDqG+7gxx5V8R9jRNu1CUsycX9WB 4h1ptFqHx1DDW8gBLBcb2SPVd6eMs+RNwBaBY1am7n5MXVaAkvRezdX0K9+kfAIoJU19 dSU+GlxX+bsfWpEMUvl1Cqr1SrmEV3yrd1wQ15UUftMT+CaV6p1CDi7dS322smUyMSo3 u+DQ== X-Gm-Message-State: AOUpUlFcdD+NPjIwO7cStaV5BvlrmJFeU/ncfO1CKZ/9rxfSAZhQFooX 3lIwcT3tyrGA98NaJsAbxyZubcRuqbp5Posh6bg= X-Google-Smtp-Source: AAOMgperMNbIFB+jFfwGpK/xPu5p2JPiBwNwp21iyujE1TyxaX5aytmLL21Dei57dQ2ZH68eIE55qLh3CsWYe+X9OOI= X-Received: by 2002:a24:9197:: with SMTP id i145-v6mr1511715ite.39.1533077900522; Tue, 31 Jul 2018 15:58:20 -0700 (PDT) MIME-Version: 1.0 References: <259C7423-4574-4062-ADE9-D4D8B2C3D56F@gmail.com> In-Reply-To: <259C7423-4574-4062-ADE9-D4D8B2C3D56F@gmail.com> Date: Tue, 31 Jul 2018 19:58:09 -0300 Message-ID: To: claude.pache@gmail.com Cc: Sara Golemon , PHP Internals Content-Type: multipart/alternative; boundary="000000000000ac7a8705725383a4" Subject: Re: [PHP-DEV] Nullable cast (?int) From: david.proweb@gmail.com (David Rodrigues) --000000000000ac7a8705725383a4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks a lot! 1. I never did a RFC and have no karma to do, so if someone wants to help me with that, I appreciate (contact me directly, then we could publish RPC link as reply here). 2. Too, I could not implementate it, and I don't know if it is a requirement to write a RFC or if it could be done in another moment. 3. What PHP version it should be focused? 7.4, right? Em ter, 31 de jul de 2018 =C3=A0s 16:50, Claude Pache escreveu: > > > > Le 31 juil. 2018 =C3=A0 21:07, Sara Golemon a =C3=A9c= rit : > > > >> On Tue, Jul 31, 2018 at 2:23 PM, David Rodrigues < > david.proweb@gmail.com> wrote: > >> Currently we have support to (int) cast (and similar). But I do think > that > >> we too need a possibility to do a nullable cast. In terms, it will cas= t > to > >> (int) only if value is not null, else it should be kept as null. > >> > > I like this proposal. Short, simple, and consistent with other parts > > of PHP syntax. Write up an RFC for it? > > > > -Sara > > > > And, please, also consider `settype($x, '?int')`. > > I have userland functions in my code for those type of casts. > > =E2=80=94Claude > > --=20 David Rodrigues --000000000000ac7a8705725383a4--