3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { } class b { } var_dump(serialize(new 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 qAtXI
Output for 7.0.0 - 7.2.0
string(12) "O:1:"b":0:{}" object(a)#1 (0) { } object(b)#1 (0) { }
Output for 5.3.21 - 5.6.21
string(12) "O:1:"b":0:{}" Warning: unserialize() expects exactly 1 parameter, 2 given in /in/CtFOX on line 17 bool(false) Warning: unserialize() expects exactly 1 parameter, 2 given in /in/CtFOX on line 18 bool(false)