Encountered and AMF3 Type Marker use AMF3 serializer. Once AMF3 is
encountered it will not return to AMf0.

@param  string $data
@return Zend_Amf_Parse_Amf0_Serializer
190254
public function writeAmf3TypeMarker(&$data)
    {
        require_once 'Zend/Amf/Parse/Amf3/Serializer.php';
        $serializer = new Zend_Amf_Parse_Amf3_Serializer($this->_stream);
        $serializer->writeTypeMarker($data);
        return $this;
    }
1267047
protected function parseDistinct($data)
    {
        $set = $this->_parseDataItemToKeys($data, $this->query->hasAlias());
        return empty($set) ? '' : 'DISTINCT ' . implode(',', array_unique($set));
    }
54319
public function unserialize(array $data)
    {
        if (!isset($data['access_token'])) {
            throw new \InvalidArgumentException('Unable to create a RawToken without an "access_token"');
        }

        $this->accessToken = $data['access_token'];
        $this->refreshToken = isset($data['refresh_token']) ? $data['refresh_token'] : null;
        $this->expiresAt = isset($data['expires_at']) ? $data['expires_at'] : null;

        return $this;
    }
292307
public function unserialize($data)
    {
        $data = @unserialize($data);
        if (!is_array($data) ||
            !isset($data[0]) ||
            ($data[0] != self::VERSION)) {
            throw new Exception('Cache version change');
        }

        $this->_search = $data[1];
        if (isset($data[2])) {
            $this->_charset = $data[2];
        }
    }
779947
public function unserialize($data)
    {
        $data = @unserialize($data);
        if (!is_array($data) ||
            !isset($data[0]) ||
            ($data[0] != self::VERSION)) {
            throw new Horde_Mime_Exception('Cache version change');
        }

        $this->_headers = new Horde_Support_CaseInsensitiveArray($data[1]);
        // TODO: BC
        $this->_eol = $data[2];
    }
899015
public function create($data)
    {
        $methodDescriptor = new MethodDescriptor();
        $methodDescriptor->setNamespace(
            substr(
                (string) $data->getFqsen(),
                0,
                -strlen($data->getName()) - 4
            )
        );
        $this->mapReflectorToDescriptor($data, $methodDescriptor);

        $this->assembleDocBlock($data->getDocBlock(), $methodDescriptor);
        $this->addArguments($data, $methodDescriptor);
        $this->addVariadicArgument($data, $methodDescriptor);

        return $methodDescriptor;
    }
1230358
public function unserialize($data)
    {
        $object = unserialize($data);

        foreach ($object['engines'] as &$engine) {
            if ($engine[0] instanceof SerializableClosure) {
                $engine[0] = $engine[0]->getClosure();
            }
        }

        $this->engines = $object['engines'];
        $this->renderer = $object['renderer'];
    }
1071382
public function serialize($data)
    {
        if (is_array($data) || (is_object($data) && !method_exists($data, '_toString'))) {
            throw new \InvalidArgumentException(__CLASS__ . ' can not handle an array or non-stringable object.');
        }

        return $data;
    }
1269528
public static function maybe_unserialize($data)
    {
        // If it isn't a string, it isn't serialized
        if (!is_string($data)) {
            return $data;
        }

        $data = trim($data);

        // Is it the serialized NULL value?
        if ($data === 'N;') {
            return null;
        }

        $length = strlen($data);

        // Check some basic requirements of all serialized strings
        if ($length < 4 || $data[1] !== ':' || ($data[$length - 1] !== ';' && $data[$length - 1] !== '}')) {
            return $data;
        }

        // $data is the serialized false value
        if ($data === 'b:0;') {
            return false;
        }

        // Don't attempt to unserialize data that isn't serialized
        $uns = @unserialize($data);

        // Data failed to unserialize?
        if ($uns === false) {
            $uns = @unserialize(self::fix_broken_serialization($data));

            if ($uns === false) {
                return $data;
            } else {
                return $uns;
            }
        } else {
            return $uns;
        }
    }
456479
public function serializeData($data) {
		if(is_array($data)) {
			ksort($data);
			$return = '';
			foreach($data as $key => $value) {
				if(is_numeric($key)) {
					$return .= $this->serializeData($value);
				} else {
					$return .= $key . $this->serializeData($value);
				}
			}
			return $return;
		} else {
			return (string)$data;
		}
	}
1349629
public function to_serialized($data = null)
	{
		if ($data === null)
		{
			$data = $this->_data;
		}

		return serialize($data);
	}
273662
public function setData($data)
    {
        if ( ! (is_array($data) || $data instanceof Traversable)) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s expects an array or Traversable collection; invalid collection of type %s provided',
                    __METHOD__,
                    is_object($data) ? get_class($data) : gettype($data)
                )
            );
        }

        // https://github.com/zendframework/zend-inputfilter/pull/169
        $this->collectionRawValues = $data;

        foreach ($data as $item) {
            if (is_array($item) || $item instanceof Traversable) {
                continue;
            }

            throw new InvalidArgumentException(
                sprintf(
                    '%s expects each item in a collection to be an array or Traversable; '
                    . 'invalid item in collection of type %s detected',
                    __METHOD__,
                    is_object($item) ? get_class($item) : gettype($item)
                )
            );
        }

        $this->data = $data;
        return $this;
    }
1240933
public static function deserializeObject(array $data)
    {
        /** @var ResourceType $result */
        $result = self::deserializeCommonAttributes($data);
        $result->name = $data['name'];
        $result->description = $data['description'];
        $result->endpoint = $data['endpoint'];
        $result->schema = $data['schema'];
        if (isset($data['schemaExtensions'])) {
            $result->schemaExtensions = [];
            foreach ($data['schemaExtensions'] as $schemaExtension) {
                $result->schemaExtensions[$schemaExtension['schema']] = $schemaExtension['required'];
            }
        }

        return $result;
    }
463791
public function unserialize($data)
    {
        $data = unserialize($data);

        $this->mMap      = $data['m_map'];
        $this->scMap     = $data['sc_map'];
        $this->spMap     = $data['sp_map'];
        $this->routes    = $data['routes'];
        $this->timestamp = $data['timestamp'];
    }
1004089
public function normalize($data, SerializationContext $context)
    {
        return $this->serializer->normalize($data->jsonSerialize(), $context);
    }
589374
public function create($data)
    {
        $descriptor = new UsesDescriptor($data->getName());
        $descriptor->setDescription($data->getDescription());
        $reference = $data->getReference();

        $descriptor->setReference($reference);

        return $descriptor;
    }
744103
public static function jsonUnserialize($data) {

		$report = null;

		if (!is_array($data)) {
			$data = (Array) json_decode($data, true);
		}

		if (count(array_intersect(['type', 'message', 'data'], array_keys($data))) == 3) {
			$report = new self($data['type'], $data['message'], $data['data']);
			if (isset($data['children']) && is_array($data['children'])) {
				foreach ($data['children'] as $child) {
					$report->add(static::jsonUnserialize($child));
				}
			}
		}

		return $report;
	}