removed unreachable code
skip null values
$value can't be an object
don't use extract() so it's not possible to overwrite $array and $options (unlikely, but possible)