Skip to content

Experiment/value class - #23754

Closed
Yanick-K wants to merge 3 commits into
php:masterfrom
Yanick-K:experiment/value-class
Closed

Yanick-K wants to merge 3 commits into
php:masterfrom
Yanick-K:experiment/value-class

Conversation

@Yanick-K

Copy link
Copy Markdown

No description provided.

Recognize value as a contextual class modifier and reuse final, readonly and no-dynamic-property checks with a dedicated class flag. Reject parent classes, destructors and custom clone methods, including trait imports.

Preserve existing object representation, equality, identity, serialization and readonly-compatible trait behavior. Cover syntax and semantics with PHPT tests.
Add ReflectionClass::isValue(), retain unsigned class flag masks and include the value modifier in textual reflection output. Regenerate reflection declarations and add coverage for reflection, OPcache persistence and tracing JIT.
Record the implemented semantics, limitations, build and test results, changed files and reproducible benchmark measurements. Analyze the existing Zend optimizer and propose seeding SCCP property defaults for non-escaping constructor-free value objects as the next optimization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant