What is the difference between session_create_id and session_regenerate_id()?

前端 未结 2 1101
清酒与你
清酒与你 2021-01-22 09:41

Doc says

session_create_id() is used to create new session id for the current session. session_regenerate_id() Update the current session id wi

2条回答
  •  深忆病人
    2021-01-22 10:01

    Yes there is a difference, session_create_id() will create a new sessionId discarding the current $_SESSION information, where as session_regenerate_id() doesn't destroys them, instead it just updates the sessionId

    Referred from : http://php.net/manual/en/function.session-create-id.php & http://php.net/manual/en/function.session-regenerate-id.php

提交回复
热议问题