I'm not sure why you think changing the php version would have any affect on the cookie lifetime.

The php version check is only used to determine whether we set the secure/http_only flags, not the cookie lifetime.

As I said earlier it is the initial 0 entry in the parameters for session_set_cookie_params that determines the life of the cookie

e.g. we do
session_set_cookie_params(0

so the cookie has a lifetime of 0 seconds between browser restarts.

you can set this to a value that represents the number of seconds that the cookie will last between browser restarts.

Could you explain a bit more about what you are trying to achieve ?