VersionPress\Utils\EntityUtils::isChanged PHP Method

isChanged() private static method

Threads string numbers as equals to their numeric equivalents so e.g. "0" = 0
private static isChanged ( $oldData, $newValue ) : boolean
$oldData
$newValue
return boolean
    private static function isChanged($oldData, $newValue)
    {
        if (is_numeric($oldData) && is_numeric($newValue)) {
            return $oldData != $newValue;
        }
        if (is_string($oldData) && $oldData === "" && $newValue === null) {
            return false;
        }
        return $oldData !== $newValue;
    }