Instantiator\Instantiator::getSerializationFormat PHP Method

getSerializationFormat() private method

Verifies if the given PHP version implements the Serializable interface serialization with an incompatible serialization format. If that's the case, use serialization marker "C" instead of "O".
private getSerializationFormat ( ReflectionClass $reflectionClass ) : string
$reflectionClass ReflectionClass
return string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER
    private function getSerializationFormat(ReflectionClass $reflectionClass)
    {
        if ($this->isPhpVersionWithBrokenSerializationFormat() && $reflectionClass->implementsInterface('Serializable')) {
            return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER;
        }
        return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER;
    }