rfc:not_serializable
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:not_serializable [2023/12/09 12:06] – maxsem | rfc:not_serializable [2023/12/10 12:31] (current) – maxsem | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2023-11-26 | * Date: 2023-11-26 | ||
* Author: Max Semenik, maxsem.wiki@gmail.com | * Author: Max Semenik, maxsem.wiki@gmail.com | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 51: | Line 51: | ||
</ | </ | ||
- | This change | + | The non-serializable flag is inherited by descendants: |
+ | |||
+ | <code php> | ||
+ | class MyOtherClass extends MyClass | ||
+ | { | ||
+ | } | ||
+ | |||
+ | serialize(new MyOtherClass()); | ||
+ | </ | ||
+ | |||
+ | The above requires no changes to the engine whatsoever, all functionality is already present - it merely gets exposed to userspace. | ||
+ | |||
+ | This feature will be exposed to reflection by the following additions to ReflectionClass: | ||
+ | |||
+ | <code php> | ||
+ | public const int IS_NOT_SERIALIZABLE = ZEND_ACC_NOT_SERIALIZABLE; | ||
+ | |||
+ | public function isSerializable(): | ||
+ | </ | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== |
rfc/not_serializable.1702123593.txt.gz · Last modified: 2023/12/09 12:06 by maxsem