Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Silvio Marijić
Hi Rowan, I agree that RFC needs a bit refinement which I hope to do during ongoing discussion here. Originally you couldn't assign following types to an immutable property - *Resource* - *Instance of none-immutable class * Now I had to resort to also add *array* to that list. Regarding

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Silvio Marijić
In addition to your question about impact on the performance, there is none. As there is no special tracking of those references just control check when you try to write by reference. 2018-02-23 14:40 GMT+01:00 Silvio Marijić : > Hi Rowan, > > I agree that RFC needs a bit refinement which I hope

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Paul Jones
Hi Silvio, I like the RFC. * * * I would like to see arrays allowed as immutable properties. In I wrote that arrays are "probably not practical in most situations" because you have to "recursively scan through array properties to make sure that they con

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Silvio Marijić
Thanks Paul, I do have rough idea how to go about arrays possibly without recursive scan, I have to try couple of things, it could work if some checks are moved to zval level. For now it is in the future scope unless I manage to handle the within week or two. First two proposals are valid points.

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Niklas Keller
Hey, > If you do allow arrays, they would have to follow the same rules as the > immutable object. > > Alternatively, perhaps an ImmutableArrayObject would be a good addition or > followup to the RFC. That would just move the problem and doesn't have any benefit over directly allowing arrays, r

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Niklas Keller
Hey, > I do have rough idea how to go about arrays possibly without recursive > scan, I have to try couple of things, it could work if some checks are > moved to zval level. For now it is in the future scope unless I manage to > handle the within week or two. What's the issue with a one-time runt

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Silvio Marijić
Hi Niklas, Problem with checking array on assignment is that it could be N dimensions deep and one would have perform check for each item in each dimension for mutable values which could have some performance implications. Regarding constructor call, upon first initialization of object, you are al

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Niklas Keller
Hey, > Problem with checking array on assignment is that it could be N dimensions > deep and one would have perform check for each item in each dimension for > mutable values which could have some performance implications. if you want to enforce that in userland now, you have even higher performa

Re: [PHP-DEV][RFC][DISCUSSION] Immutability

2018-02-23 Thread Silvio Marijić
I agree that for any real world applications it wouldn't affect performance, I just didn't want to leave any holes in implementation. Ill test couple of solutions for arrays to see how it works. Yeah, checks are also in place for multiple constructor calls. Regarding your suggestion to draft RFC

[PHP-DEV] Setting up CNA for PHP CVEs

2018-02-23 Thread Stanislav Malyshev
Hi! I've been complaining in the past about the way PHP CVE are handled - they are sometimes issued with no coordination with anybody from PHP developers, sometimes contain misleading and outright wrong information and sometimes disregard our guidelines for security issues (https://wiki.php.net/se

Re: [PHP-DEV] FPM maintainership?

2018-02-23 Thread Helmut K. C. Tessarek
On 2018-02-22 22:28, Stanislav Malyshev wrote: > Great! There are also a number of issues in the bug db for FPM that > could use a review, and I am not sure what to do about > https://bugs.php.net/bug.php?id=75605 specifically... You do realize that this bug is marked private, thus nobody can say

Re: [PHP-DEV] FPM maintainership?

2018-02-23 Thread Stanislav Malyshev
Hi! >> Great! There are also a number of issues in the bug db for FPM that >> could use a review, and I am not sure what to do about >> https://bugs.php.net/bug.php?id=75605 specifically... > > You do realize that this bug is marked private, thus nobody can say > anything about it... Not nobody

Re: [PHP-DEV] FPM maintainership?

2018-02-23 Thread Helmut K. C. Tessarek
Hi Stas, On 2018-02-23 19:39, Stanislav Malyshev wrote: >> You do realize that this bug is marked private, thus nobody can say >> anything about it... > > Not nobody - Jakub actually does have access to it :) Ok, because I've even tried with my php id and I could still not see it. Anyway, I'd b