PhpAmqpLib/Wire/AMQPReader.php
public function read_array($returnObject = false)
    {
        $this->bitcount = $this->bits = 0;

        // Determine array length and its end position
        $arrayLength = $this->read_php_int();
        $endOffset = $this->offset + $arrayLength;

        $result = $returnObject ? new AMQPArray() : array();

        // Read values until we reach the end of the array
        while ($this->offset < $endOffset) {
            $fieldType = AMQPAbstractCollection::getDataTypeForSymbol($this->rawread(1));
            $fieldValue = $this->read_value($fieldType, $returnObject);
            $returnObject ? $result->push($fieldValue, $fieldType) : $result[] = $fieldValue;
        }

        return $result;
    }
public function read_array($returnObject = false)
    {
        $this->bitcount = $this->bits = 0;

        // Determine array length and its end position
        $arrayLength = $this->read_php_int();
        $endOffset = $this->offset + $arrayLength;

        $result = $returnObject ? new AMQPArray() : array();

        // Read values until we reach the end of the array
        while ($this->offset < $endOffset) {
            $fieldType = AMQPAbstractCollection::getDataTypeForSymbol($this->rawread(1));
            $fieldValue = $this->read_value($fieldType, $returnObject);
            $returnObject ? $result->push($fieldValue, $fieldType) : $result[] = $fieldValue;
        }

        return $result;
    }
public function read_array ( $ returnObject = false ) { $ this -> bitcount = $ this -> bits = 0 ; // Determine array length and its end position $ arrayLength = $ this -> read_php_int ( ) ; $ endOffset = $ this -> offset + $ arrayLength ; $ result = $ returnObject ? new AMQPArray ( ) : array ( ) ; // Read values until we reach the end of the array while ( $ this -> offset < $ endOffset ) { $ fieldType = AMQPAbstractCollection :: getDataTypeForSymbol ( $ this -> rawread ( 1 ) ) ; $ fieldValue = $ this -> read_value ( $ fieldType , $ returnObject ) ; $ returnObject ? $ result -> push ( $ fieldValue , $ fieldType ) : $ result [ ] = $ fieldValue ; } return $ result ; }
Reads the array in the next value.

@param bool $returnObject Whether to return AMQPArray instance instead of plain array
@return array|AMQPArray
Reads the array in the next value .