getProperties(); foreach ($properties as $property) { $property->setAccessible(true); if ($property->isInitialized($current)) { $value = $property->getValue($current); if (is_object($value)) { $stack[] = $value; } $type = $property->getType(); if ($type instanceof ReflectionNamedType) { $type = $type->getName(); } else { $type = 'mixed'; } $name = $property->getName(); $tokens[] = "$type:$name"; } } } sort($tokens); return hash('crc32b', implode($tokens)); } }