3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { protected $bar; } class bar extends foo { } $test = new bar(); $meh = serialize($test); $meh = unserialize($meh, ['allowed_classes' => 'foo']);
Output for 7.1.0 - 7.2.0
Warning: unserialize(): allowed_classes option should be array or boolean in /in/d3mus on line 14
Output for 7.0.0 - 7.0.20
Output for 5.4.0 - 5.6.28
Warning: unserialize() expects exactly 1 parameter, 2 given in /in/d3mus on line 14
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/d3mus on line 14
Process exited with code 255.