3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sid = 12345; session_id($session_id); session_start();
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: Undefined variable $session_id in /in/XrMSW on line 3 Warning: session_start(): Session cannot be started after headers have already been sent in /in/XrMSW on line 4
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Undefined variable $session_id in /in/XrMSW on line 3 Warning: session_start(): Session cannot be started after headers have already been sent in /in/XrMSW on line 4
Output for 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: session_id in /in/XrMSW on line 3 Warning: session_id(): Cannot change session id when headers already sent in /in/XrMSW on line 3 Warning: session_start(): Cannot start session when headers already sent in /in/XrMSW on line 4
Output for 7.3.32 - 7.3.33
Output for 7.1.0 - 7.1.20
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.22 - 5.5.38, 5.6.6 - 5.6.30, 7.0.0 - 7.0.29
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 5.5.2 - 5.5.21, 5.6.0 - 5.6.5
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(): 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 cache limiter - headers already sent (output started at /in/XrMSW:3) in /in/XrMSW on line 4 Warning: Unknown: The session id is too long or 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.2.13 - 5.2.17, 5.3.2 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.1
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.0.5, 5.1.0 - 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.3.11, 4.4.0 - 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

preferences:
245.08 ms | 403 KiB | 392 Q