Generates an array of byte values.

@return array $tempvals An array of bytes.
551099
private function genBytes()
    {
        $tempvals = array();

        for ($x = 0; $x < 256; $x++) {
            $tempvals[$x] = chr($x);
        }

        return $tempvals;
    }
1246043
public function toMappedArray()
    {
        $values = $this->toArray();
        $mappedValues = [];
        foreach ($values as $key => $value) {
            $mappedValues[$key] = $this->readMapped($key);
        }

        return $mappedValues;
    }
1088770
public function toArray()
    {
        $result = [];
        $result['id']            = $this->id;
        $result['toUserName']    = $this->toUserName;
        $result['fromUserName']  = $this->fromUserName;
        $result['createTime']    = $this->createTime;
        $result['msgType']       = $this->msgType;
        return $result;
    }
990481
public static UByte[] ubyte_a(byte... values) {
        UByte[] array = new UByte[values.length];
        for (int i = 0; i < values.length; i++) {
            array[i] = ubyte(values[i]);
        }
        return array;
    }
673062
public function getBytes()
    {
        $result = '';
        foreach ($this->getChunks() as $chunk) {
            $result .= $chunk['data']->bin;
        }

        return $result;
    }
392085
public function getBytes()
    {
        $bytes = '';

        $hex = $this->toString();
        $hex = str_replace('-', '', $hex);

        foreach (range(-2, -32, 2) as $step) {
            $bytes = chr(hexdec(substr($hex, $step, 2))) . $bytes;
        }

        return $bytes;
    }
231233
public byte[] getValues() {
    byte[] copy = new byte[values.length];
    System.arraycopy(values, 0, copy, 0, values.length);
    return copy;
  }
320933
public function toArray()
	{
		$array = array();
		for( $i=$this->interval->getStart(); $i<$this->interval->getEnd(); $i++ )
		{
			$value = $this->getPartialSum( $this->interval->getStart(), $i );
			$array[$i] = $value;
		}
		return $array;
	}
437751
public function toStreamContextArray(): array
    {
        $options = [
            'crypto_method' => $this->toStreamCryptoMethod(),
            'peer_name' => $this->peerName,
            'verify_peer' => $this->verifyPeer,
            'verify_peer_name' => $this->verifyPeer,
            'verify_depth' => $this->verifyDepth,
            'ciphers' => $this->ciphers ?? \OPENSSL_DEFAULT_STREAM_CIPHERS,
            'capture_peer_cert' => $this->capturePeer,
            'capture_peer_cert_chain' => $this->capturePeer,
            'SNI_enabled' => $this->sniEnabled,
        ];

        if ($this->certificate !== null) {
            $options['local_cert'] = $this->certificate->getCertFile();

            if ($this->certificate->getCertFile() !== $this->certificate->getKeyFile()) {
                $options['local_pk'] = $this->certificate->getKeyFile();
            }
        }

        if ($this->caFile !== null) {
            $options['cafile'] = $this->caFile;
        }

        if ($this->caPath !== null) {
            $options['capath'] = $this->caPath;
        }

        if (\OPENSSL_VERSION_NUMBER >= 0x10100000) {
            $options['security_level'] = $this->securityLevel;
        }

        return ['ssl' => $options];
    }
1310209
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setInteger('s', $this->size, self::DEFAULT_SIZE)
                    ->setInteger('r', $this->renderedSize, self::DEFAULT_SIZE)
                    ->setArray('l', $this->layers, function (Layer $layer): array {
                        return $layer->writeData();
                    }, []);
        return $dataBuilder->getData();
    }
1149327
public function toFlatArray() {
        $array = [];

        foreach ($this->headers as $key => $headers) {
            foreach ($headers as $header) {
                $array[] = $this->formatHeader($key, $header);
            }
        }

        return $array;
    }
337927
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setString('m', $this->requiredModName, '')
                    ->setString('v', $this->requiredVersion, '')
                    ->setInteger('r', $this->isMandatory ? 1 : 0, 0);
        return $dataBuilder->getData();
    }
419922
public function toBinary()
    {
        $bytes = '';

        foreach (str_split($this->value, 8) as $piece) {
            $bytes .= chr(bindec($piece));
        }

        return $bytes;
    }
1233727
public function getBytes()
    {
        $bytes = '';

        foreach (range(-2, -32, 2) as $step) {
            $bytes = chr(hexdec(substr($this->getHex(), $step, 2))) . $bytes;
        }

        return $bytes;
    }
1135865
public function serialize(): array {
        // base 64 encode
        $details = array_map(function($value) {
            return base64_encode($value);
        }, $this->details);

        // enrich with encryption type
        return $details + ['encryption' => $this->encryption];
    }
551113
public function toArrayValues()
    {
        $result = [];
        foreach ($this->each() as $v) {
            $this->_toArrayValues($result, $v);
        }
        return $result;
    }
126537
public function toCharArray(){
		
		$arr = array();
		
		for($i = 0, $l = $this->count(); $i < $l; ++$i){
			$arr[] = \mb_substr($this->_Value, $i, 1, $this->_Encoding);
		}
		
		return $arr;
		
	}