Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114597 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73525 invoked from network); 25 May 2021 17:02:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 May 2021 17:02:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 87B231804E3 for ; Tue, 25 May 2021 10:13:30 -0700 (PDT) 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-Virus: No X-Envelope-From: Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 ; Tue, 25 May 2021 10:13:30 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id t15so37170461edr.11 for ; Tue, 25 May 2021 10:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/4N8AkWtttzN3GUWcef/eLZlU/FbKG8BAYJHQUECFyM=; b=Y55U34rHGYWJWmx+Ncn+MG77oMpHYWltpPlN4HMBxvzormb0QXx1z/AuXFJADakmM2 2BJ2YU7ejCgzzM8SzdLuVDYjoucjMHTTYWBsbsJL6kSnDG1qdrXdaUujld9dLHwoKPDT GvK3K430VrMU3sndrqntVkvlLQDcZAIGtEAhaFM+2jKornzm179jpbfD++N63G/F7NND btcGOigvA6sHi5W9nxyd6b9WnfR58T9xCEWYLLSPMpjbGCCnYe5LGJ4aJOPP/iUtfshz 9NN8NzTuGpC2WwRxsL7achckDAjLlfvVgBP92wjmTx6Xot6XLm/mCeiPIRimyG5IVUi1 TmDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/4N8AkWtttzN3GUWcef/eLZlU/FbKG8BAYJHQUECFyM=; b=g4CnB/CkdWKPe39M+C9RXxGTajivX0vviU3VIiWSetP14Y4u1HX/E+mfrjpxLwuGkQ rvAkSYjbQpN0yO++OUGeNuukcoGrIWq8nqgBv8ClSkC2agLTXLbWG3K1YAM8ScJxKxel T4wvxizmd/k3pb7wzFailzk0JCiZlPl7coa5jOkpYVk2GRtTRtvAtplYAlbRrUhRVjKn vIUJ2lFguxD7vCz+2FFAQq+fwI1ob9fmaBCh8Ts97HXjbXnYVuOaoXwn2/HgfZzXM5F/ jAgsq4gIIgBi3cMxkNA1W7dy20C76XtgkAn5Rv/aU2VLS4kh6qIiM5IDyNb63q4oTMUX PCIA== X-Gm-Message-State: AOAM532Yc7pFH+RjThnzgau5TmEnPvsqK4sDmUMqcqBqtEvNBkVWc7Tr dKI/Do7IxIEGLbWuFIL+xZg= X-Google-Smtp-Source: ABdhPJxTmdlBwLcFCRVptm2gfHbZoSDPJudHOTrOeega/rRmugBhnVRCRPV3q7u4KgLDF6dztmbN4A== X-Received: by 2002:a05:6402:42cd:: with SMTP id i13mr32682308edc.34.1621962808049; Tue, 25 May 2021 10:13:28 -0700 (PDT) Received: from claude.fritz.box ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id n4sm2356760eja.121.2021.05.25.10.13.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 May 2021 10:13:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\)) In-Reply-To: Date: Tue, 25 May 2021 19:13:26 +0200 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <9D54F5C4-CE4C-49E5-A00C-37AB66EE99C5@gmail.com> References: To: Kamil Tekiela X-Mailer: Apple Mail (2.3608.120.23.2.6) Subject: Re: [PHP-DEV] Disable autovivification on false From: claude.pache@gmail.com (Claude Pache) > Le 25 mai 2021 =C3=A0 18:23, Kamil Tekiela a = =C3=A9crit : >=20 > Hi Internals, >=20 > I'd like to start a discussion on the following RFC > https://wiki.php.net/rfc/autovivification_false > Particularly, I am looking for opinions on whether this behaviour = should be > left alone, should be disabled on false, or should be disabled on null = and > false, and left only for undefined variables. >=20 > Autovivification is very useful in PHP, especially with = multidimensional > arrays and loops. However, the question is should we allow it on false = and > null values going forward. >=20 > Kind Regards, > Kamil Tekiela Hi, * IMO, null and undefined should be treated the same way, because for = many purposes, they are not distinguished (e.g., isset() and ??). In = general, I=E2=80=99m setting something to null when I want to avoid an = =E2=80=9CUndefined symbol=E2=80=9D notice, I am sure it is not a bug, = and I don=E2=80=99t want to scatter my code with `isset()` or `??` = checks. * In any case, the removing of the autovivification behaviour MUST be = preceded by a period of deprecation notices. =E2=80=94Claude=