Immutable hash for arrays, add not sort keys flag

This commit is contained in:
2026-09-18 21:53:36 +09:00
parent 3a33f07ae7
commit 369f2e2586
3 changed files with 42 additions and 7 deletions
+1
View File
@@ -113,6 +113,7 @@ $tests = [
];
foreach ($tests as $test) {
print "IMMUTABLE HASH FOR ARRAY: " . Hash::generateImmutableHashForArray($test) . "<br>";
print "IMMUTABLE HASH FOR ARRAY: " . Hash::generateImmutableHashForArray($test, sort_keys:false) . "<br>";
print "SERIALIZED HASH FOR ARRAY: " . hash(Hash::DEFAULT_HASH, serialize($test)) . "<br>";
}