Exemplo n.º 1
0
 function amf_encode($data, $options = AMF_DEFAULT_OPTIONS)
 {
     return AMF::serialize($data, $options);
 }
Exemplo n.º 2
0
 public function testSerializeBytes()
 {
     $samples = [new ByteArray('A'), new ByteArray('$1�2'), new ByteArray(0b11000011101010), new ByteArray(file_get_contents(__DIR__ . '/php.ico'))];
     foreach ($samples as $sample) {
         $this->assertEquals($sample, AMF::deserialize(AMF::serialize($sample, AMF_DEFAULT_OPTIONS, Spec::AMF3_BYTE_ARRAY)));
     }
 }