3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function _unserialize($val) { if($result = ($val == serialize(false)) || ($result = @unserialize($val) == true)) { return $result; } return false; } var_dump(_unserialize('s:6:"foobar";')); var_dump(_unserialize('foobar')); var_dump(_unserialize('b:0;')); var_dump(serialize(false));
based on V315T
Output for 4.3.0 - 7.2.0
bool(true) bool(false) bool(true) string(4) "b:0;"