3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php session_start(); function session_active() { if (function_exists('session_status')) { return (session_status() == PHP_SESSION_ACTIVE); } return defined('SID'); } var_dump(session_active()); ?>
Output for 5.2.3 - 7.1.0
bool(true)
Output for 4.3.5 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/WQAdi on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/WQAdi:2) in /in/WQAdi on line 2 bool(true)
Output for 4.3.2 - 4.3.4
Warning: session_start(): Cannot send session cookie - headers already sent in /in/WQAdi on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/WQAdi:2) in /in/WQAdi on line 2 int(1)
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/WQAdi on line 2 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/WQAdi:2) in /in/WQAdi on line 2 int(1)