$val) { if ($val === '__unset') { unset($expandedVersion[$key]); } else { $expandedVersion[$key] = $val; } } $expanded[] = $expandedVersion; } return $expanded; } /** * Minifies an array of versions into a set of version diffs * * @param array[] $versions A list of version arrays * @return array[] A list of versions minified with each array only containing the differences to the previous one */ public static function minify(array $versions) { $minifiedVersions = array(); $lastKnownVersionData = null; foreach ($versions as $version) { if (!$lastKnownVersionData) { $lastKnownVersionData = $version; $minifiedVersions[] = $version; continue; } $minifiedVersion = array(); // add any changes from the previous version foreach ($version as $key => $val) { if (!isset($lastKnownVersionData[$key]) || $lastKnownVersionData[$key] !== $val) { $minifiedVersion[$key] = $val; $lastKnownVersionData[$key] = $val; } } // store any deletions from the previous version for keys missing in current one foreach ($lastKnownVersionData as $key => $val) { if (!isset($version[$key])) { $minifiedVersion[$key] = "__unset"; unset($lastKnownVersionData[$key]); } } $minifiedVersions[] = $minifiedVersion; } return $minifiedVersions; } } __halt_compiler();----SIGNATURE:----lwyC7oTHpLfZ031AZUjAL/Pt5YCHcFSVhX2opOdxly0JNcAihgwF1xxuQoI1GhSnpsSMAxmi0pggRjcCVoH4ghBiI1mqO/6vq0Cl37MV03akVFIbEq/g1pO3yVV3Lbq4wbNoF8fXxic3HA9AS2g3a5OhcwI/U1PlmZL5B9SzSU0zBlaF24Qtx/OHSCLz7AW9EjdSmJdcoXwK0VIxNHR6Eib3vrgQ3hAo3fgGEP2ywfiZ4Z7+r9U7JvxLVEt0J/MpZY2XqQvxqilx7Tj3ET9PooIz8r/vmjFJ57JGnVJ3mnZWjZ5WbG4q1KaQ3pt4BlcKEXJowJdFJgmCHZu6rFC9+HQUI19vvjZZo9TBOplufgrB2ERqIafAEbqPe4/DLy29XlsjUlAPl53D7i6sUQ11P/GT2r7F/hHBl/vUGzjrHY2XrdEK2vNwS5Edj78vsvws9VkSPbJmFBGjZz5w9AH1bRQ0Tt5XawYJd9jZCNrGTyy0Zhbf7TINZwYGTyFd8cqSvU2QXjcm6b9M7HNccC2nRkYpZzv4t4F9Xih3iRVUdm60ko2kDVC1XBafNbtWvQ+1617lVlwuWmSzcnVCyXgpNKuHjEli+ww5tS09F/YgTX6mYU+cyuGkTK6Op2wfwLUDNtud1eDPzicuuoP/tN0i2uZlQ/r2sb988/mZPMBLFm8=----ATTACHMENT:----OTY0NDU2NjM1MDcwMTk0OSA4MjA5MjYyOTUxODcyMzcwIDMyMzA0MDQ2MTYwODYxMjI=