« first day (4898 days earlier)      last day (275 days later) » 

00:05
@Crell yes regarding if it's a Collection<Foo>, then thou shalt not put something into it that is not a Foo. and basically I would envision explicit type boundaries to fixate types
 
4 hours later…
03:56
@LeviMorrison Have you heard about liquid types? Some people managed to add those as an extension to Rust: dl.acm.org/doi/10.1145/3591283
 
13 hours later…
16:56
@Girgias I haven't. I'll add it to my reading list, thanks!
3v4l.org/aSpYq What the heck is this? :D
@IluTov The array state does look weird but the object state is fine. Two different private fields.
Of course, running the var_export is not going to work right...
Right, including unmangled private properties is useless, since you can't know what classes they belong to. I just stumbled across this when thinking about how this should behave for property hooks.
Apart from the fact that including two private properties with the same name causes loss of information.
Looks like a necessary BC break is in order.
May want to punt it to 9.0 anyway, unless you can figure out how to nicely mangle only when it's necessary (no conflicts).
17:14
Unfortunately, there's not an obvious migration path, apart from introducing a new parameter or a completely new function.
Mangling might also be necessary if the private property belongs to some parent class, unless we expect the __set_state implementation to traverse parents to find the right property via reflection.
17:27
I'm not sure why the feature exists, exactly.
And various bugs have been found with various implementations of it for specific classes, especially internals.
In my head I would try to deprecate and remove it. Would have to figure out what code actually uses this pattern to see what alternative APIs might need to be introduced first.
18:06
I think it's mostly used as a potentially faster alternative to serialize, as opcache can cache the file to avoid parsing it every time it is read. According to Larrys benchmark this isn't actually faster, although it seems like it should be.
 
2 hours later…
19:57
@IluTov It definitely seems like it should be faster than parsing/unserializing each request. We use var_export to write the results of a build step to cache files. These are mostly simple associative arrays.
20:25
Constant values should definitely be faster. With opcache, they can be moved to shm, while with unserialize they would need to be reconstructed in memory every time. For objects, the difference in performance might be significantly smaller.

« first day (4898 days earlier)      last day (275 days later) »