3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ob_start(); $path = ini_get('session.save_path') . '/sess_'; 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 5.2.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false) bool(false)
Output for 5.2.0 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/V2uKf on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/V2uKf on line 5 bool(false) Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /in/V2uKf on line 9 bool(false)
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
Warning: session_start(): Cannot send session cookie - headers already sent in /in/V2uKf on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/V2uKf on line 5 bool(false) Warning: session_regenerate_id(): Cannot send session cookie - headers already sent in /in/V2uKf on line 9 bool(false)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/V2uKf on line 11
Process exited with code 255.
Output for 4.4.3 - 4.4.9
Warning: session_start(): Cannot send session cookie - headers already sent in /in/V2uKf on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/V2uKf on line 5 bool(true) Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /in/V2uKf on line 9 bool(true)
Output for 4.3.2 - 4.4.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/V2uKf on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/V2uKf on line 5 bool(true) Warning: session_regenerate_id(): Cannot send session cookie - headers already sent in /in/V2uKf on line 9 bool(false)
Output for 4.3.0 - 4.3.1
Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent in /in/V2uKf on line 5 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent in /in/V2uKf on line 5 bool(true) Fatal error: Call to undefined function: session_regenerate_id() in /in/V2uKf on line 9