Check whether or not the object has change value

@return bool
330261
public function hasChange()
    {
        foreach ($this as $key => $value) {
            if ($this->isAdded || $this->isDeleted) {
                return true;
            }
        }

        return false;
    }
813124
public function hasOnUpdate()
    {
        $database = $this->getTable()->getDatabase();
        if($database instanceof Database &&
               $this->onUpdate === $database->getPlatform()->getDefaultFKOnUpdateBehavior()) {
          return false;
        }

        return ($this->onUpdate !== self::NONE);
    }
1096156
public function isDirty()
    {
        if (
            !empty($this->_dirtyAttr) ||
            (($this instanceof DeleteBySaving) && $this->isDeleted())
        ) {
            return true;
        }

        foreach (array_keys(get_object_vars($this)) as $key) {
            foreach ((array) $this->$key as $sub) {
                if (($sub instanceof DirtyAware) && $sub->isDirty()) {
                    return true;
                }
            }
        }
        return false;
    }
804212
public function was_changed( $attributes = null ) {
		return $this->has_changes(
			$this->get_changes(), is_array( $attributes ) ? $attributes : func_get_args()
		);
	}
438185
function is_changed($attr_name = null)
    {
        if (isset($attr_name)){
            return array_key_exists($attr_name, $this->_changes);
        }
        return !empty($this->_changes);
    }
1205272
function changed($key=NULL) {
		if (isset($key))
			return $this->fields[$key]['changed'];
		foreach($this->fields as $key=>$field)
			if ($field['changed'])
				return TRUE;
		return FALSE;
	}
24877
protected function updateChanges($forceChanges = false)
    {
        if ($forceChanges) {
            // Force changes, but only for loaded fields
            foreach ($this->record as $field => $value) {
                $this->changed[$field] = static::CHANGE_VALUE;
            }
            return true;
        }
        return $this->isChanged();
    }
5727
def _has_changed(instance):
    
    for field, value in instance._original_fields.items():
        if field != 'pk' and \
           not isinstance(instance._meta.get_field(field), ManyToManyField):
            try:
                if field in getattr(instance, '_tracked_fields', []):
                    if isinstance(instance._meta.get_field(field), ForeignKey):
                        if getattr(instance, '{0}_id'.format(field)) != value:
                            return True
                    else:
                        if getattr(instance, field) != value:
                            return True
            except TypeError:
                # Can't compare old and new value, should be different.
                return True
    return False
159227
public function modified() {
		if (count($this->_original) !== count($this->_data)) {
			return true;
		}
		foreach ($this->_original as $key => $doc) {
			$updated = $this->_data[$key];
			if (!isset($updated)) {
				return true;
			}
			if ($doc !== $updated) {
				return true;
			}
			if (!is_object($updated) || !method_exists($updated, 'modified')) {
				continue;
			}
			$modified = $this->_data[$key]->modified();

			if (in_array(true, $modified)) {
				return true;
			}
		}
		return false;
	}
329829
public function wasChanged($attributes = null)
    {
        return $this->hasChanges(
            $this->getChanges(), is_array($attributes) ? $attributes : func_get_args()
        );
    }
251699
private function getUpdateChangeSetHandler()
    {
        return function ($key, $value, $obj) {
            $op = '$set';
            if (null === $value) {
                $op = '$unset';
                $value = 1;
            }
            $obj[$op][$key] = $value;
            return $obj;
        };
    }
750435
public function isChanged(): bool
    {
        $this->changedFiles = [];
        do{
            $readResult = \inotify_read($this->handler);
            if(false === $readResult)
            {
                return $result ?? false;
            }
            foreach($readResult as $item)
            {
                $key = array_search($item['wd'], $this->paths);
                if(false === $key)
                {
                    continue;
                }
                $filePath = File::path($key, $item['name']);
                $filePathIsDir = is_dir($filePath);
                if(!$filePathIsDir)
                {
                    $this->changedFiles[] = $filePath;
                }
                if(Bit::has($item['mask'], IN_CREATE) || Bit::has($item['mask'], IN_MOVED_TO))
                {
                    if($filePathIsDir && !$this->isExclude($filePath))
                    {
                        $this->paths[$filePath] = \inotify_add_watch($this->handler, $filePath, $this->mask);
                    }
                }
            }
            $result = isset($readResult[0]);
        }while(true);
    }
879129
protected function hasStty(): bool
	{
		if(static::$hasStty === null)
		{
			exec('stty 2>&1', $output, $status);

			static::$hasStty = $status === 0;
		}

		return static::$hasStty;
	}
1279288
def _has_changed(self, initial, data):
        """"""
        if data == initial:
            return False
        return bool(initial) != bool(data)
124779
final public function valuesHadChanged(): bool
    {
        if (! is_array($this->originalValues)) {
            throw new \RuntimeException('The recordset does not contain any original values');
        }
        foreach ($this->originalValues as $field => $value) {
            $current = array_key_exists($field, $this->values) ? $this->values[$field] : null;
            if ($this->valueIsDifferent($value, $current)) {
                return true;
            }
        }
        return false;
    }
1108422
public function hasChanged($name)
    {
        if ($this->hasOldAttribute($name) && $this->hasNewAttribute($name)) {
            return $this->getOldAttribute($name) != $this->getNewAttribute($name);
        } else {
            // Unknown attribute
        }
    }
183215
public function isVersioned()
    {
        if (!$this->ObjectClass || !class_exists($this->ObjectClass)) {
            return false;
        }
        /** @var Versioned|DataObject $singleton */
        $singleton = DataObject::singleton($this->ObjectClass);
        return $singleton->hasExtension(Versioned::class) && $singleton->hasStages();
    }