src/IronMQ.php
public function reserveMessages($queue_name, $count = 1, $timeout = self::GET_MESSAGE_TIMEOUT, $wait = self::GET_MESSAGE_WAIT)
    {
        $queue = rawurlencode($queue_name);
        $url = "projects/{$this->project_id}/queues/$queue/reservations";
        $params = array();
        if ($count !== 1) {
            $params['n'] = (int) $count;
        }
        if ($timeout !== self::GET_MESSAGE_TIMEOUT) {
            $params['timeout'] = (int) $timeout;
        }
        if ($wait !== self::GET_MESSAGE_WAIT) {
            $params['wait'] = (int) $wait;
        }
        $this->setJsonHeaders();
        $response = $this->apiCall(self::POST, $url, $params);
        $result = self::json_decode($response);
        if (count($result->messages) < 1) {
            return null;
        } else {
            return $result->messages;
        }
    }
public function reserveMessages($queue_name, $count = 1, $timeout = self::GET_MESSAGE_TIMEOUT, $wait = self::GET_MESSAGE_WAIT)
    {
        $queue = rawurlencode($queue_name);
        $url = "projects/{$this->project_id}/queues/$queue/reservations";
        $params = array();
        if ($count !== 1) {
            $params['n'] = (int) $count;
        }
        if ($timeout !== self::GET_MESSAGE_TIMEOUT) {
            $params['timeout'] = (int) $timeout;
        }
        if ($wait !== self::GET_MESSAGE_WAIT) {
            $params['wait'] = (int) $wait;
        }
        $this->setJsonHeaders();
        $response = $this->apiCall(self::POST, $url, $params);
        $result = self::json_decode($response);
        if (count($result->messages) < 1) {
            return null;
        } else {
            return $result->messages;
        }
    }
Reserve multiplie messages from queue

@param string $queue_name Queue name
@param int $count
@param int $timeout
@return array|null array of messages or null