public static function keys($object)
    {
        if ($object instanceof \stdClass)
            $object = (array)$object;

        if (is_array($object))
            return array_keys($object);

        $result = [];
        static::each($object, function ($item, $key) use (& $result) {
            $result[] = $key;
        });

        return $result;
    }
public static function keys($object)
    {
        if ($object instanceof \stdClass)
            $object = (array)$object;

        if (is_array($object))
            return array_keys($object);

        $result = [];
        static::each($object, function ($item, $key) use (& $result) {
            $result[] = $key;
        });

        return $result;
    }
public static function keys ( $ object ) { if ( $ object instanceof \ stdClass ) $ object = ( array ) $ object ; if ( is_array ( $ object ) ) return array_keys ( $ object ) ; $ result = [ ] ; static :: each ( $ object , function ( $ item , $ key ) use ( & $ result ) { $ result [ ] = $ key ; } ) ; return $ result ; }
Retrieve all the names of the object's properties.

@category Object Functions

@param traversable $object the list from which the keys are extracted

@return array
Retrieve all the names of the object s properties .