Re: [PHP-DEV] [RFC] [Vote] Type Guards for Classes

2024-05-16 Thread Jordan LeDoux
On Thu, May 16, 2024 at 1:32 PM Patrik Václavek 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,

Re: [PHP-DEV] [RFC] [Vote] Type Guards for Classes

2024-05-16 Thread Larry Garfield
On Thu, May 16, 2024, at 3:31 PM, Patrik Václavek 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 clas

Re: [PHP-DEV] [RFC] [Vote] Type Guards for Classes

2024-05-16 Thread Ilija Tovilo
Hi Patrik On Thu, May 16, 2024 at 10:31 PM Patrik Václavek wrote: > > Introduce a new type guard syntax for classes: > > ```php > (Foo) $variable; > ``` > > This syntax will internally perform the following operations: > > 1. Check if `$variable` is an instance of `Foo`. > 2. If the check fails,

Re: [PHP-DEV] [RFC] [Vote] Type Guards for Classes

2024-05-16 Thread Benjamin Morel
On Thu, 16 May 2024 at 22:33, Patrik Václavek 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, e

[PHP-DEV] [RFC] [Vote] Type Guards for Classes

2024-05-16 Thread Patrik Václavek
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.

[PHP-DEV] [Discussion] Follow-up RFC for BCMath\Number object

2024-05-16 Thread Saki Takamachi
Hi all, I would like to start additional discussion about BCMath\Number in this thread. If my summary is incorrect, please let me know. First, make a list of points to note. - Suggestions for using 64-bit integer types internally for performance > If we are not going to use the newfound opa

[PHP-DEV] Re: [RFC] [vote] Support object type in BCMath

2024-05-16 Thread Saki Takamachi
Hi all, > 2024/05/01 17:55、Saki Takamachi のメール: > > Hi all! > > Voting for RFC: Support object type in BCMath has started. Voting ends on > 2024-05-16 00:00 GMT. > https://wiki.php.net/rfc/support_object_type_in_bcmath > > Regards, > > Saki RFC: Support object type in BCMath was approved wi