3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements \Serializable { public function unserialize(string $serialized) { } public function serialize() { } }
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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/SS4HE on line 3
Output for 8.0.0 - 8.0.30
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of Foo::unserialize(string $serialized) must be compatible with Serializable::unserialize($serialized) in /in/SS4HE on line 5
Process exited with code 255.
Output for 7.1.25 - 7.1.28, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Fatal error: Declaration of Foo::unserialize(string $serialized) must be compatible with Serializable::unserialize($serialized) in /in/SS4HE on line 3
Process exited with code 255.

preferences:
144.66 ms | 402 KiB | 165 Q