public function readArray()
    {
        $arrayReference = $this->readInteger();
        if (($arrayReference & 0x01)==0){
            $arrayReference = $arrayReference >> 1;
            if ($arrayReference>=count($this->_referenceObjects)) {
                require_once 'Zend/Amf/Exception.php';
                throw new Zend_Amf_Exception('Unknow array reference: ' . $arrayReference);
            }
            return $this->_referenceObjects[$arrayReference];
        }

        // Create a holder for the array in the reference list
        $data = array();
        $this->_referenceObjects[] =& $data;
        $key = $this->readString();

        // Iterating for string based keys.
        while ($key != '') {
            $data[$key] = $this->readTypeMarker();
            $key = $this->readString();
        }

        $arrayReference = $arrayReference >>1;

        //We have a dense array
        for ($i=0; $i < $arrayReference; $i++) {
            $data[] = $this->readTypeMarker();
        }

        return $data;
    }
public function readArray()
    {
        $arrayReference = $this->readInteger();
        if (($arrayReference & 0x01)==0){
            $arrayReference = $arrayReference >> 1;
            if ($arrayReference>=count($this->_referenceObjects)) {
                require_once 'Zend/Amf/Exception.php';
                throw new Zend_Amf_Exception('Unknow array reference: ' . $arrayReference);
            }
            return $this->_referenceObjects[$arrayReference];
        }

        // Create a holder for the array in the reference list
        $data = array();
        $this->_referenceObjects[] =& $data;
        $key = $this->readString();

        // Iterating for string based keys.
        while ($key != '') {
            $data[$key] = $this->readTypeMarker();
            $key = $this->readString();
        }

        $arrayReference = $arrayReference >>1;

        //We have a dense array
        for ($i=0; $i < $arrayReference; $i++) {
            $data[] = $this->readTypeMarker();
        }

        return $data;
    }
public function readArray ( ) { $ arrayReference = $ this -> readInteger ( ) ; if ( ( $ arrayReference & 0x01 ) == 0 ) { $ arrayReference = $ arrayReference >> 1 ; if ( $ arrayReference >= count ( $ this -> _referenceObjects ) ) { require_once 'Zend/Amf/Exception.php' ; throw new Zend_Amf_Exception ( 'Unknow array reference: ' . $ arrayReference ) ; } return $ this -> _referenceObjects [ $ arrayReference ] ; } // Create a holder for the array in the reference list $ data = array ( ) ; $ this -> _referenceObjects [ ] = & $ data ; $ key = $ this -> readString ( ) ; // Iterating for string based keys. while ( $ key != '' ) { $ data [ $ key ] = $ this -> readTypeMarker ( ) ; $ key = $ this -> readString ( ) ; } $ arrayReference = $ arrayReference >> 1 ; //We have a dense array for ( $ i = 0 ; $ i < $ arrayReference ; $ i ++ ) { $ data [ ] = $ this -> readTypeMarker ( ) ; } return $ data ; }
Read amf array to PHP array

- array = 0x09 integer-data ( [ 1OCTET *amf3-data ] | [OCTET *amf3-data 1] | [ OCTET *amf-data ] )

@return array
Read amf array to PHP array