public static function keys($value)
    {

        if (is_array($value)) {
            return array_keys($value);
        }

        if (!is_object($value)) {
            return [];
        }

        if (!$value instanceof Traversable) {
            return array_keys(get_object_vars($value));
        }

        return array_keys(iterator_to_array($value, true));

    }
public static function keys($value)
    {

        if (is_array($value)) {
            return array_keys($value);
        }

        if (!is_object($value)) {
            return [];
        }

        if (!$value instanceof Traversable) {
            return array_keys(get_object_vars($value));
        }

        return array_keys(iterator_to_array($value, true));

    }
public static function keys ( $ value ) { if ( is_array ( $ value ) ) { return array_keys ( $ value ) ; } if ( ! is_object ( $ value ) ) { return [ ] ; } if ( ! $ value instanceof Traversable ) { return array_keys ( get_object_vars ( $ value ) ) ; } return array_keys ( iterator_to_array ( $ value , true ) ) ; }
Return the keys of the passed array or object

@param mixed $value

@return array
Return the keys of the passed array or object