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/293bX:3) in /in/293bX on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/293bX:3) in /in/293bX on line 5 bool(true) Warning: session_destroy(): Trying to destroy uninitialized session in /in/293bX on line 9 bool(true)
Output for 4.3.2 - 7.0.14
bool(false) Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/293bX:3) in /in/293bX on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/293bX:3) in /in/293bX on line 5 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/293bX:3) in /in/293bX on line 5 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/293bX:3) in /in/293bX on line 5 bool(true) bool(true)