Re: [PHP-DEV] [RFC] Enumerations

2020-12-08 Thread Dennis Birkholz
Am 08.12.20 um 18:40 schrieb Larry Garfield: > For serialization, we'll introduce a new serialization marker, enum, which > will make it feasible too round-trip an enum while maintaining > singleton-ness. More specifically, the deserialize routine would essentially > become $type::from($value),

Re: [PHP-DEV] [RFC] Enumerations

2020-12-08 Thread Aleksander Machniak
On 08.12.2020 18:40, Larry Garfield wrote: > * We're going to shift Enums to be a single class with a bunch of secret > properties inside to hold the different case object instances, rather than a > class per case. That should make the overall memory usage lower, especially > for enums with a l

Re: [PHP-DEV] [RFC] Enumerations

2020-12-08 Thread Pierre R.
Le 08/12/2020 à 18:40, Larry Garfield a écrit : On Sat, Dec 5, 2020, at 2:26 PM, Larry Garfield wrote: On Fri, Dec 4, 2020, at 5:24 PM, Larry Garfield wrote: Greetings, denizens of Internals! Ilija Tovilo and I have been working for the last few months on adding support for enumerations and al

Re: [PHP-DEV] [RFC] Enumerations

2020-12-08 Thread Larry Garfield
On Sun, Dec 6, 2020, at 7:00 PM, Paul Crovella wrote: Hi Paul. Although we're on hold for a bit while Ilija makes some changes in direction (see previous email), I wanted to respond to your concerns in particular because it sounds like you're misunderstanding the scope and roadmap of what we'r

Re: [PHP-DEV] [RFC] Enumerations

2020-12-08 Thread Larry Garfield
On Sat, Dec 5, 2020, at 2:26 PM, Larry Garfield wrote: > On Fri, Dec 4, 2020, at 5:24 PM, Larry Garfield wrote: > > Greetings, denizens of Internals! > > > > Ilija Tovilo and I have been working for the last few months on adding > > support for enumerations and algebraic data types to PHP. This

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-08 Thread Christian Schneider
Am 08.12.2020 um 17:16 schrieb Mike Schinkel : > 1. Please consider making is_file() return false for an embedded \0 and no > longer throw an exception or generate a warning. The PR implementing this has already been merged for inclusion in PHP 8.0.1: https://github.com/php/php-src/pull/6478 >

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-08 Thread Mike Schinkel
> On Dec 1, 2020, at 12:18 PM, Aimeos | Norbert Sendetzky > wrote: > > Hi internals > > PHP 8 is stricter in checking input data then PHP 7. This is good but > has some side effects for is_file(), is_dir() and similar functions when > invalid paths are passed for checking. > > In PHP 7, this r

Re: [PHP-DEV] [RFC] Enumerations

2020-12-08 Thread Rowan Tommins
On 07/12/2020 20:20, Max Semenik wrote: I myself have tried to draft my proposal athttps://wiki.php.net/rfc/enum_v2 which has aspects both similar and different from yours. I'm afraid that proposal would be a strong -1 from me, as "fancy constants" are my least favourite type of enum. In p