3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class obj implements Serializable { public $data; } $object = new obj(); $object->data = 1; $inner = serialize($object); $exploit = 'a:2:{i:0;C:3:"obj":' . strlen($inner) . ':{' . $inner . '}i:1;R:3;}'; $data = unserialize($exploit); var_dump($data);
based on 4raH1
Output for 7.0.0 - 7.2.0
Fatal error: Class obj contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Serializable::serialize, Serializable::unserialize) in /in/4975J on line 2
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Class obj contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Serializable::serialize, Serializable::unserialize) in /in/4975J on line 6
Process exited with code 255.