<?php
class myClass implements Serializable {
public function serialize() {
throw new Exception('Serialization of \'myClass\' is not allowed.');
}
public function unserialize() {
}
}
$myClass = new myClass;
var_dump(serialize($myClass));
Fatal error: Declaration of myClass::unserialize() must be compatible with Serializable::unserialize(string $data) in /in/eo6tq on line 8
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of myClass::unserialize() must be compatible with Serializable::unserialize($serialized) in /in/eo6tq on line 8
Process exited with code 255.
Fatal error: Declaration of myClass::unserialize() must be compatible with Serializable::unserialize($serialized) in /in/eo6tq on line 3
Process exited with code 255.
Fatal error: Declaration of myClass::unserialize() must be compatible with that of Serializable::unserialize() in /in/eo6tq on line 3
Process exited with code 255.
Output for 5.0.5
Fatal error: Interface 'Serializable' not found in /in/eo6tq on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class 'Serializable' not found in /in/eo6tq 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/eo6tq on line 3
Process exited with code 255.