A PHP internals mailing list discussion about a proposed RFC to make closures from constant expressions (introduced in PHP 8.5 for attribute arguments and parameter defaults) serializable. The RFC proposes serializing them as references to their declaration site using a `member@callable` identifier format. Key discussion points include: whether to split the RFC into two, the security model for unserialization (declared-set boundary vs. unrestricted name-based resolution), how first-class callables should be identified in the serialized format, handling of private method access during deserialization, and whether a limited Reflection-only API version might achieve broader consensus ahead of the PHP 8.6 deadline.

16m read timeFrom externals.io
Post cover image
118 Impressions