public static function getAllValuesOfKey(array $array, $key)
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($array)) {
            return null;
        }

        $values = [];

        foreach ($array as $index => $value) {
            if ($index === $key) {
                $values[] = $value;

                continue;
            }

            if (is_array($value)) {
                $recursiveValues = self::getAllValuesOfKey($value, $key);

                if (!empty($recursiveValues)) {
                    $merged = array_merge($values, $recursiveValues);
                    $values = $merged;
                }
            }
        }

        return $values;
    }