3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { } class b { } $as = 'O:1:"a":0:{}'; $bs = 'O:1:"b":0:{}'; var_dump(unserialize($as, array('allowed_asss' => 'a') )); var_dump(unserialize($bs, array('allowed_asss' => 'a') ));
based on CtFOX
Output for 7.0.0 - 7.2.0
object(a)#1 (0) { } object(b)#1 (0) { }
Output for 5.5.0 - 5.6.28
Warning: unserialize() expects exactly 1 parameter, 2 given in /in/AV3Qi on line 15 bool(false) Warning: unserialize() expects exactly 1 parameter, 2 given in /in/AV3Qi on line 16 bool(false)