<?php
class Ab implements Serializable{
/**
* @var ElementDataTypeImpl
*/
protected $x;
function __construct()
{
$this->x = 'val';
}
public function serialize()
{
throw new Exception('Can\' serialize ');
}
public function unserialize()
{
throw new Exception('Can\' serialize ');
}
}
var_dump(serialize(new Ab()));
die;
Fatal error: Declaration of Ab::unserialize() must be compatible with Serializable::unserialize(string $data) in /in/43EFS on line 19
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of Ab::unserialize() must be compatible with Serializable::unserialize($serialized) in /in/43EFS on line 19
Process exited with code 255.
Fatal error: Declaration of Ab::unserialize() must be compatible with Serializable::unserialize($serialized) in /in/43EFS on line 3
Process exited with code 255.
Fatal error: Declaration of Ab::unserialize() must be compatible with that of Serializable::unserialize() in /in/43EFS on line 3
Process exited with code 255.
Output for 5.0.5
Fatal error: Interface 'Serializable' not found in /in/43EFS on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class 'Serializable' not found in /in/43EFS 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/43EFS on line 3
Process exited with code 255.