<?php
class A implements Serializable {
public function serialize() {
return serialize($this);
}
public function unserialize() {
}
private $a = "a";
protected $b = "b";
public $c = "c";
}
var_dump(serialize(new A()));
Fatal error: Declaration of A::unserialize() must be compatible with Serializable::unserialize(string $data) in /in/oOQPO on line 9
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of A::unserialize() must be compatible with Serializable::unserialize($serialized) in /in/oOQPO on line 9
Process exited with code 255.
Fatal error: Declaration of A::unserialize() must be compatible with Serializable::unserialize($serialized) in /in/oOQPO on line 3
Process exited with code 255.
Fatal error: Declaration of A::unserialize() must be compatible with that of Serializable::unserialize() in /in/oOQPO on line 3
Process exited with code 255.
Output for 5.0.5
Fatal error: Interface 'Serializable' not found in /in/oOQPO on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class 'Serializable' not found in /in/oOQPO on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/oOQPO on line 3
Process exited with code 255.