3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<pre><?php $path = ini_get('session.save_path') . '/sess_'; var_dump($path); session_start(); // starts session & creates and locks file var_dump( is_file($path . session_id()) ); // -> TRUE session_regenerate_id(); // starts new session, but file is not create! var_dump( is_file($path . session_id()) ); // -> FALSE
Output for 7.1.0
<pre>string(6) "/sess_" Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/5ksW0:1) in /in/5ksW0 on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/5ksW0:1) in /in/5ksW0 on line 5 bool(false) Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in /in/5ksW0 on line 9 bool(false)
Output for 5.2.15 - 7.0.14
<pre>string(6) "/sess_" Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/5ksW0:1) in /in/5ksW0 on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/5ksW0:1) in /in/5ksW0 on line 5 bool(false) Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /in/5ksW0 on line 9 bool(false)