Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123325 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 25A701ADAE3 for ; Thu, 16 May 2024 21:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715894697; bh=AJqLTTpSqA+X0YjxGHCKoMGbZwEdTIqYKiaFdJToAh0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RBdQ9dPwCQos2cqLyZlBpkBfSjrhKtOrAXACCT1kXdxk1mM7ceOU3kpUtoVxw/d/P yuO2hoGmwQy2s7WjoDPPxwGkn7Gd49OqKCblqCAlI5LUiOMmHDMick7qxlY5YcoN5z 2K/DWMkIR0ESO2TU+zithgkqsLmI0+6ITo1/Qupzzh7hMsfq2YyfMpSFTTWeUgbloJ Xj+giqvpdYH/yYApzdxNCfeAkG5L3Xd8lO/izUwvEx7EwmJeNWMJh2c+1I+mvm0kDd i+ll6uTGD43MfHQcf8wBUNY4fY+/SZxdVvuTHmp0nS57xEA8fzblmDCbr66dzT/1Tu +AhopRWun4bCw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 873091801D9 for ; Thu, 16 May 2024 21:24:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,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,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 ; Thu, 16 May 2024 21:24:51 +0000 (UTC) Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7e21dfbc310so48696239f.1 for ; Thu, 16 May 2024 14:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715894637; x=1716499437; 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=AJqLTTpSqA+X0YjxGHCKoMGbZwEdTIqYKiaFdJToAh0=; b=dGWE1V7dtz7ti34eXF5L2SBVdXw7LDNJwHRfGK+xiD4kqNAK+daADRw9mV31E6PIQn dx0Mj+vZWjuQTqyo3+eli2H/fZpKuJAshk5re4jc1u30NSthEB2bRGFnV1oOHB1c+qso 4Amczyt9GKGopeiWWm8JttEJxulqVcNqFEfJX38hVmuCdgURVTrr5GDOXmnTrQ7pSd1j DIX/F0Ui2045NYod5MuDelDFlOSmk6m4wtRJeJT45tmqt/Wzvi1+iw5AJjFGwB9clZ2P JZ2fK98N9V8/vSkrHMcQa3cEA8t0VEvk2tYfO2xC83bhlBMAmnnZpiwW0aaIMk1ef9E6 g5/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715894637; x=1716499437; 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=AJqLTTpSqA+X0YjxGHCKoMGbZwEdTIqYKiaFdJToAh0=; b=IJ2nx8KlokxjmMvsfnBgJILjJAygOCIxPHWZEviVLscegbGAN6cQT3C6GU3brOixG1 /o/unPXJM3Mh2kVpluSFtfFkXDGy5E/qM43W7u0ARlQYy3+sWaFO94ah+/+1YKEFkupd DPtC9PD2V1erYvHIBU2rq5nVnOU3grZx9jLDLAl6OreMFcsQy8XfKhXC6TgTHJ+725Oy xoFgqBxdTtIlijB4SYA7FN5lbznCl5g5tutWfhPYRW1UEjxfF40Q/YC7S+r2KabJ0TFG /j4vdRrex7LVJW79bMVGkifATx99N/YDBTWzIEGeNfcIuXXtFYfMw0lUFNhtKmY0NzUr Y1Wg== X-Gm-Message-State: AOJu0YwTecrwc6zC5YuBJANnWeI2ErfXpChdisHrREGy33SEJp0YSVwE ugdh51Mp3IeWjkb+QTWDukRWvVMedIfV3EPQGBmiH89ZzmOBGsOOYNEMSpotVSvJf5Ii6BTJ20X 6krd1guINniB+Hj5cbk860Ignorh5/kfrbIo= X-Google-Smtp-Source: AGHT+IHoQROqy78jlIe/6YHH1pM/7ropg9y5MpXyJF1W213b7IXGK24g28qaMI8YU1dbom1rY0gbXL6XTnf2sO5Waqg= X-Received: by 2002:a05:6e02:1909:b0:36c:f0b:4f55 with SMTP id e9e14a558f8ab-36cc14f7bcdmr255336495ab.26.1715894637353; Thu, 16 May 2024 14:23:57 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <3A6.1T4AB.9eXWvq4hof.1cHcqE@seznam.cz> In-Reply-To: <3A6.1T4AB.9eXWvq4hof.1cHcqE@seznam.cz> Date: Thu, 16 May 2024 23:23:46 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] [Vote] Type Guards for Classes To: =?UTF-8?Q?Patrik_V=C3=A1clavek?= Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000054e198061898da12" From: benjamin.morel@gmail.com (Benjamin Morel) --00000000000054e198061898da12 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 16 May 2024 at 22:33, Patrik V=C3=A1clavek wrote= : > Introduction > ************* > > This RFC proposes a new feature in PHP: type guards for classes (or > interfaces). This feature aims to simplify and standardize the process of > verifying that a variable is an instance of a specific class, enhancing > code readability and reducing boilerplate code. > Hi, please see this discussion: https://externals.io/message/105332 In particular this comment from Nikita: https://externals.io/message/105332#105348 That being said, I would still love it if we could find a way to get this feature, under this syntax or another, into PHP! - Ben --00000000000054e198061898da12 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, 16 May 2024 at 22:33, Patrik V=C3= =A1clavek <PaTrOnY@email.cz> = wrote:
Introduction
*************

<= /div>
This RFC proposes a new feature in PHP: type guards for classes (= or interfaces). This feature aims to simplify and standardize the process o= f verifying that a variable is an instance of a specific class, enhancing c= ode readability and reducing boilerplate code.

<= /div>
Hi, please see this discussion:
<= div>
In particular this comment from Nikita:

That being said, I would = still love it if we could find a way to get this feature, under this syntax= or another, into PHP!

- Ben

<= /div>
--00000000000054e198061898da12--