code: public function isAttributeChanged($name, $identical = true)
      {
          if (isset($this->_attributes[$name], $this->_oldAttributes[$name])) {
              if ($identical) {
                  return $this->_attributes[$name] !== $this->_oldAttributes[$name];
              }
  
              return $this->_attributes[$name] != $this->_oldAttributes[$name];
          }
  
          return isset($this->_attributes[$name]) || isset($this->_oldAttributes[$name]);
      }
docs: Returns a value indicating whether the named attribute has been changed.
  @param string $name the name of the attribute.
  @param bool $identical whether the comparison of new and old value is made for
  identical values using `===`, defaults to `true`. Otherwise `==` is used for comparison.
  This parameter is available since version 2.0.4.
  @return bool whether the attribute has been changed