source/Core/Session.php
protected function isClassOrNullInSerializedObjectAfterField($serializedObject, $fieldName, $className)
    {
        $fieldAndClassPattern = '/'. preg_quote($fieldName, '/') . '";((?P<null>N);|O:\d+:"(?P<class>[\w\\\\]+)":)/';
        $matchFound = preg_match($fieldAndClassPattern, $serializedObject, $matches) === 1;

        return $matchFound &&
            (
                (isset($matches['class']) && $matches['class'] === $className) ||
                (isset($matches['null']) && $matches['null'] === 'N')
            );
    }
protected function isClassOrNullInSerializedObjectAfterField($serializedObject, $fieldName, $className)
    {
        $fieldAndClassPattern = '/'. preg_quote($fieldName, '/') . '";((?P<null>N);|O:\d+:"(?P<class>[\w\\\\]+)":)/';
        $matchFound = preg_match($fieldAndClassPattern, $serializedObject, $matches) === 1;

        return $matchFound &&
            (
                (isset($matches['class']) && $matches['class'] === $className) ||
                (isset($matches['null']) && $matches['null'] === 'N')
            );
    }
protected function isClassOrNullInSerializedObjectAfterField ( $ serializedObject , $ fieldName , $ className ) { $ fieldAndClassPattern = '/' . preg_quote ( $ fieldName , '/' ) . '";((?P<null>N);|O:\d+:"(?P<class>[\w\\\\]+)":)/' ; $ matchFound = preg_match ( $ fieldAndClassPattern , $ serializedObject , $ matches ) === 1 ; return $ matchFound && ( ( isset ( $ matches [ 'class' ] ) && $ matches [ 'class' ] === $ className ) || ( isset ( $ matches [ 'null' ] ) && $ matches [ 'null' ] === 'N' ) ) ; }
True if given class or null value is found after given field in serialized object.

@param string $serializedObject
@param string $fieldName
@param string $className

@return bool
True if given class or null value is found after given field in serialized object .