File manager - Edit - /opt/alt/tests/alt-php84-pecl-msgpack_2.2.0-1.el8/tests/issue080.phpt
Back
--TEST-- Issue #80 (Serialized failed on unseted value) --SKIPIF-- <?php if (!extension_loaded("msgpack")) { echo "skip"; } --FILE-- <?php class MyClass { protected $field; public function preSerialize() { unset($this->field); } } $t = new MyClass(); $t->preSerialize(); var_dump(msgpack_unserialize(msgpack_serialize($t))); ?> --EXPECTF-- object(MyClass)#%d (1) { ["field":protected]=> NULL }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings