# Yii2 $changedAttributes

**URL:** <https://www.shiqidu.com/t/topic/597>\
**Category:** 开发调优\
**Tags:** Yii\
**Created:** [2019 年7 月 16 日 14:22 UTC](https://www.shiqidu.com/t/topic/597 "2019-07-16T14:22:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![Eureka](https://www.shiqidu.com/user_avatar/www.shiqidu.com/eureka/32/5_2.png) [@Eureka](https://www.shiqidu.com/u/Eureka)\
发布日期： [2019 年7 月 16 日 14:22 UTC](https://www.shiqidu.com/t/topic/597/1 "2019-07-16T14:22:56Z")

</div>

此变量包含的是发生改变的字段数组，如下

```php
array (size=3)
  'node_id' => int 3
  'edit_times' => int 3
  'last_edit_time' => string '2019-07-16 22:17:10' (length=19)

```

并不是所有save的字段。
