3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sid = 12345; session_id($session_id); session_start();
Output for 7.1.0
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.0.14
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): Cannot start session with empty session ID in /in/XrMSW on line 4
Output for hhvm-3.12.0
Notice: Undefined variable: session_id in /in/XrMSW on line -1
Output for hhvm-3.10.0
Notice: Undefined variable: session_id in /in/XrMSW on line 3
Output for 5.2.13 - 5.2.17, 5.3.2 - 5.4.45
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4
Output for 5.2.0 - 5.2.12, 5.3.0 - 5.3.1
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4
Output for 5.0.4 - 5.1.6
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: Unknown: The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: Unknown: The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_start() [http://www.php.net/function.session-start]: The session id contains illegal characters, valid characters are only a-z, A-Z and 0-9 in /in/XrMSW on line 4 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent by (output started at /in/XrMSW:3) in /in/XrMSW 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/XrMSW:3) in /in/XrMSW on line 4 Warning: Unknown(): The session id contains illegal characters, valid characters are only a-z, A-Z and 0-9 in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0