public static function Remove( array $array, int $index ) : array
   {

      if ( $index < 0 || $index >= \count( $array ) )
      {
         return $array;
      }

      if ( $index == 0 )
      {
         return \array_slice( $array, 1 );
      }

      if ( $index + 1 == \count( $array ) )
      {
         return \array_slice( $array, 0, -1 );
      }

      $neu = \array_slice( $array, 0, $index );

      return \array_merge( $neu, \array_slice( $array, $index + 1 ) );

   }
public static function Remove( array $array, int $index ) : array
   {

      if ( $index < 0 || $index >= \count( $array ) )
      {
         return $array;
      }

      if ( $index == 0 )
      {
         return \array_slice( $array, 1 );
      }

      if ( $index + 1 == \count( $array ) )
      {
         return \array_slice( $array, 0, -1 );
      }

      $neu = \array_slice( $array, 0, $index );

      return \array_merge( $neu, \array_slice( $array, $index + 1 ) );

   }
public static function Remove ( array $ array , int $ index ) : array { if ( $ index < 0 || $ index >= \ count ( $ array ) ) { return $ array ; } if ( $ index == 0 ) { return \ array_slice ( $ array , 1 ) ; } if ( $ index + 1 == \ count ( $ array ) ) { return \ array_slice ( $ array , 0 , - 1 ) ; } $ neu = \ array_slice ( $ array , 0 , $ index ) ; return \ array_merge ( $ neu , \ array_slice ( $ array , $ index + 1 ) ) ; }
Removes the element with defined index from array and reset the array element index after the removed element.

@param  array   $array THe array.
@param  integer $index The index of the element to remove.
@return array
Removes the element with defined index from array and reset the array element index after the removed element .