この関数を含むショッピング カート ライブラリがあります。ドキュメントから、次のように述べられています。PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++. The destructor method will be called as soon as there are no other references to a particular object, or in any order during the shutdown sequence.
これが呼び出されない理由がわかりません。誰でもこれに光を当てることができますか?
public function __deconstruct () {
Yii::app()->session->add('cart', $this->order);
}