3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Class Foo { } $unserialize = unserialize( serialize(new Foo), ['allowed_classes' => ['Foo']] ); var_dump($unserialize);
based on hRY4d
Output for 7.0.0 - 7.2.0
object(Foo)#1 (0) { }
Output for 5.4.1 - 5.6.28
Warning: unserialize() expects exactly 1 parameter, 2 given in /in/dOoiP on line 11 bool(false)
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/dOoiP on line 10
Process exited with code 255.