public static function recInArray($needle, $haystack, $strict = false)
    {
        foreach ($haystack as $item) {
            if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && self::recInArray($needle, $item, $strict))) {
                return true;
            }
        }
        return false;
    }