<?php
class Foo implements Serializable
{
public function serialize() { return null; }
public function unserialize($data) {}
}
var_dump(unserialize('O:3:"Foo":0:{}'));
Deprecated: Foo implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /in/ek29p on line 3
Warning: Erroneous data format for unserializing 'Foo' in /in/ek29p on line 8
Warning: unserialize(): Error at offset 13 of 14 bytes in /in/ek29p on line 8
bool(false)
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Deprecated: Foo implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /in/ek29p on line 3
Warning: Erroneous data format for unserializing 'Foo' in /in/ek29p on line 8
Notice: unserialize(): Error at offset 13 of 14 bytes in /in/ek29p on line 8
bool(false)
Warning: Erroneous data format for unserializing 'Foo' in /in/ek29p on line 8
Notice: unserialize(): Error at offset 13 of 14 bytes in /in/ek29p on line 8
bool(false)
Output for 7.3.32 - 7.3.33
Warning: Erroneous data format for unserializing 'Foo' in /in/ek29p on line 8
bool(false)