Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112954 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82352 invoked from network); 21 Jan 2021 12:11:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Jan 2021 12:11:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 17B9118050B for ; Thu, 21 Jan 2021 03:52:01 -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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 ; Thu, 21 Jan 2021 03:52:00 -0800 (PST) Received: by mail-wr1-f48.google.com with SMTP id m4so1428346wrx.9 for ; Thu, 21 Jan 2021 03:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version; bh=PtXzUMbRNWKjVpJLD7/aEpP4U4agaooIxkTbKscWWjo=; b=orH2/TbKkbOvUXEZaQCXQZKSu+/U5nfGYYx8/tIHfv15kmDURvZkMV+aIuG+GG2y2I 5t2Pw0p1RHQI483Rhv+5aeGQ8kxv3rbELy7bvxXpiLaV5YG0dGX/LNDC9pASUPykywAP 1WteEStKOIVudkQ/4HIS7gXw76uQCHxGxWmXxo8klI6nDuzogDtPGXs3xA2JYtqmTEG6 ACDeglDUVv1b11MfRLanzHiCSjR0iN90E0XDRCt+q+V1lSsQcCWvN89mIEMCeqpcEjM+ o9meU/pEFUH4JP9mw4IXbRi/51UxaKmX7Up8QGpiMV1JyC8q06VcOiCrBXRlmY7De66K Hjgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:message-id:subject:mime-version; bh=PtXzUMbRNWKjVpJLD7/aEpP4U4agaooIxkTbKscWWjo=; b=YdizFHp9vK0CE0lj5k4IwjuBmAxI55wVykGLYyfTpACC/pKKZos2Jj6Lj23wxMoc2v Nhmg4kD4v9gccq8fp6Lu0ANVgMGoZEK/PL2FBc3oasIL/r3hafpCSGHPSFREco5k4Rz7 AP6NCDlCaQeEW9+cebIa1rp4wtnGM6PULf+eDA9ztGICtKc8uoiaEHCJ4Kmq3DkKnR/i 9E5v6+RE1qPXYkH16OfAI1ERwGWv5RwCxFJz0xzVwiABX1TxTIybFnafbSJSgz3+th2c vKByfL2u5CZzJlXGDzFvt3YvcRs1rUoOjq+XMtHqlo6VIsr1mJ8wMrdBVtj6LKYZ6Iiv +mxA== X-Gm-Message-State: AOAM533iO08MqUVoYGDdtvJpuNFHLnY0WxUcxQfIS1NuYpGNenE6gxws 79gntOfFaoEE5Y2yKMtnrBCtBVHa4OGBKg== X-Google-Smtp-Source: ABdhPJzxQ2yentljh9Ij9FgppGt3jjvIKOE47vSOXBdNxLFVQrhARe9yTEhhjA19bhEPh2fZQUEkHw== X-Received: by 2002:adf:ee09:: with SMTP id y9mr11347090wrn.74.1611229918462; Thu, 21 Jan 2021 03:51:58 -0800 (PST) Received: from [192.168.0.49] (cpc107897-blac9-2-0-cust3513.18-3.cable.virginm.net. [82.36.61.186]) by smtp.gmail.com with ESMTPSA id g187sm8270032wmf.1.2021.01.21.03.51.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2021 03:51:57 -0800 (PST) Date: Thu, 21 Jan 2021 11:51:52 +0000 To: internals@lists.php.net Message-ID: <766fb62e-9413-4472-89be-6557a45c64c8@Spark> X-Readdle-Message-ID: 766fb62e-9413-4472-89be-6557a45c64c8@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="60096add_6ceaf087_1ee" Subject: [PHP-DEV] [RFC] Null Coalescing Assignment in Method Signature From: dannysimkus@gmail.com (Daniel Simkus) --60096add_6ceaf087_1ee Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello all, I am writing to see if anyone is interested in an R=46C for ability to au= tomatically coalesce nullable method parameters with the supplied default= . It would look something like this: function foo(=3Farray =24bar =3F=3F=3D =5B=5D) =7B This would result in =24bar automatically converting to an array if null = is passed, as opposed to either having to do a null check before the func= tion call and not passing parameter at all - or alternatively having to d= o something like: function foo(=3Farray =24bar =3D =5B=5D) =7B =C2=A0=C2=A0 =C2=A0=24bar =3F=3F=3D =5B=5D; I don=E2=80=99t see this creating any BC incompatibilites and the =3F=3F=3D= syntax is something already in use in PHP since 7=7E I don=E2=80=99t have any experience with C, so would ideally love it some= one could help with the development with this, or maybe point me in the r= ight direction. I would also require R=46C Karma if people are interested in opening a di= scussion about this (dansimkus) Thank you all for your time Regards, Daniel Simkus --60096add_6ceaf087_1ee--