3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(isset($_SESSION)); session_start(); var_dump(isset($_SESSION)); session_destroy(); var_dump(isset($_SESSION));
Output for 7.1.0
bool(false) Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/0BQF0:2) in /in/0BQF0 on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/0BQF0:2) in /in/0BQF0 on line 4 bool(true) Warning: session_destroy(): Trying to destroy uninitialized session in /in/0BQF0 on line 8 bool(true)
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.0.14
bool(false) Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/0BQF0:2) in /in/0BQF0 on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/0BQF0:2) in /in/0BQF0 on line 4 bool(true) bool(true)
Output for hhvm-3.10.0 - 3.13.2
bool(true) bool(true) bool(true)
Output for 4.3.0 - 4.3.1
bool(false) Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent by (output started at /in/0BQF0:2) in /in/0BQF0 on line 4 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/0BQF0:2) in /in/0BQF0 on line 4 bool(true) bool(true)