For those who are looking for an efficient solution for handling controversial "FALSE", they can use this function which in case of non-unserializable string, instead of a "FALSE", throws an Exception. Vice versa it returns the unserialized variable.
<?php
function UnSerialize(string $serializedString, array $options = []) {
$_unserialized = @unserialize($serializedString, $options);
if ($serializedString === serialize(false) || $_unserialized !== false){
return $_unserialized;
}
throw new Exception("Non-unserializable string");
}
?>