Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122216 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17161 invoked from network); 22 Jan 2024 10:21:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jan 2024 10:21:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1705918928; bh=Bp4dwXRK/opUEi8TyNnxfMSv0HNc0mCEfvgH8+a2+a4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UOdqTr/p8fRWQtP64rux5AAYOtXy9to/iy+vMb/2nk043p9JK2rccIy7dWw7fSZKM ZREauIurDww2JD313eSJTeXPib0rEMHhKIMnX8ejo/Kom3JaFZdLHAo22eJXZTQTXQ GyTvEbN+7e5QynF9G1e/eHi8u4Co1BtsxoRSAN83nlW4ooF3d/WK2o2Oq2Kt7w2IcY NgRnyEd2/njx+ducI2W7z8VxvV7LsN9MPf9doSIcuppoXJplF6YKEeq03C/PIfr585 hVSwD6TVljwZFLbHstwhiDQtnu8tlDE325mzYrHs5T8CMpizoB3emZxDWQQLv6v+t5 AaJvVtAL+/h/w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E0BC6180048 for ; Mon, 22 Jan 2024 02:22:07 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 22 Jan 2024 02:22:07 -0800 (PST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d755e2f460so5516105ad.0 for ; Mon, 22 Jan 2024 02:21:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705918883; x=1706523683; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=B+7D9IKU7qEmDlXVCKfdI3rJk/KUDB6fU6Lwm7kLYE8=; b=jWlJamRwDmXLq3IXialWtdHUB287tWIoKwr6q6BLFBZChoCRJkKI2QHy2VtQrV2svv iUlQCO4T+rGzO1HvyqvnyfqZ/wSowwxB7/pZ6IksWO8TBPLGhgxIq75/QmBCA9TsJTBp frb/uivu5txdZgnYMX7leBIckwepjFTwq2bot3WX4LFc75e1aZPgLfsVL3T65sErAy7O 8jTZN7bR6/ar+UDDF2wFd4NJX6hFO9GrCN/TBsb3kx+SInn/HRJ49r65beF+SvWTbWEV 02eGWMu14TZ5B1JoZ1vDWEC2pAMFXMmto7ovqyRlwkIuXlBpKNv40t1WLTBtuu7ij9ia a3bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705918883; x=1706523683; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B+7D9IKU7qEmDlXVCKfdI3rJk/KUDB6fU6Lwm7kLYE8=; b=EXeQVmGpodwdAuC7//PIMS4Zz8bFXI8FWZBeUkEiPZzzpbGS4o7y7tZYWdSnb1A0dg ak0AAIkPfC4WLor0/eNR1QGtjmhbXwR/xxW799gFXZ0vvFvIYsM5fIViW4ejfzCk0dit Pv9/DABO9NmE2JcrOQlRXsdOSXIIeS4fzt5hoLUI5j1iWTAl0M2b3kul9mCjmmkqz84g LKFXqjdQYJJJs9SR9LqnghN2UZUZk/4bM0j/In3xHr1emleGdQ7F+Wkn5GfmWymqNLB8 6cqxXM8vd54eJY6ZtWYHT7xXZOo60GfVBQrSj+m4t0c8euxL++w3Cwu89nrevypoKgWi RSZg== X-Gm-Message-State: AOJu0Yz+kBTbY6C+Ttp9xg9U6cU32s48mwCJ3Mbg1ZnU/3oDKcU9Nooa UO/7YkhNyhBcu7XpLYnITG3Qy85Jd9Ll7D0KmFxBXu1u5+Y3/rpbbw+9vCIgYCrQs9AFto787bK H2yLkVcG+0v262MUcHE6tZG+faJs= X-Google-Smtp-Source: AGHT+IHNv3nKWEAPyox4cA+ikH5/UazgqP6l+OhHveBhObuXphGqhyLe0riB23mI6460hyb9IIB/1t2/ve6wXQ7w70o= X-Received: by 2002:a17:902:f685:b0:1d7:2ede:ce79 with SMTP id l5-20020a170902f68500b001d72edece79mr4382297plg.61.1705918883463; Mon, 22 Jan 2024 02:21:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 22 Jan 2024 10:21:12 +0000 Message-ID: To: "Gina P. Banyard" Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000108743060f8631b3" Subject: Re: [PHP-DEV] [RFC] Deprecate implicitly nullable parameter type From: fenniclog@gmail.com (tag Knife) --000000000000108743060f8631b3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 22 Jan 2024 at 09:51, Gina P. Banyard wrote: > Hello internals, > > M=C3=A1t=C3=A9 Kocsis and myself would like to propose deprecating implic= itly > nullable parameter types. > > The RFC is available on the wiki at the following address: > https://wiki.php.net/rfc/deprecate-implicitly-nullable-types > > > Best regards, > > Gina P. Banyard > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > Also just did a quick test, and i don't believe this would be possible. It would remove functionality from the language widely used. As you are mistaking `iint $var =3D null` params as "nullable". Which they are not, they are "optional default" parameters. The equals can be succeeded by any value, to set the parameter to such variable where the parameter is not passed. `int ?$arg` is not provided as an alternative, the directive `int ?$arg` simple allows the parameters to be passed as null, it is still required to pass through the parameter. To clarify `T ?$var` =3D Requires the parameter to be passed to the function, null value allowed `T $var =3D null` =3D Does not require the parameter to be passed to the function, is set to null if not. https://3v4l.org/IWsqK --000000000000108743060f8631b3--