Cookie reset on reopen website

I would need on browser close tab or window, dynamic cookie which I have been set should be null.

yii\web\Cookie::$expire:

https://www.yiiframework.com/doc/api/2.0/yii-web-cookie#$expire-detail

The timestamp at which the cookie expires. This is the server timestamp. Defaults to 0, meaning “until the browser is closed”.