Just some reminder which may save somebody some time regarding the `$options` array:
Say you want to be on the safe side and not allow any objects to be unserialized... My first thought was doing the following:
<?php
$lol = unserialize($string, false);
// This will generate:
// Warning: unserialize() expects parameter 2 to be array, boolean given
?>
The correct way of doing this is the following:
<?php
$lol = unserialize($string, ['allowed_classes' => false]);
?>
Hope it helps somebody!