key Ruby has no internal pointer in array objects like PHP. Because of this, there is no direct equivalent to PHP's key function. {{related: array/current array/next }}