3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function oeffne($speicherpfad, $session_name) { echo $session_name; return(true); } function schliesse() { echo 'close'; return(true); } function lese($id) { echo 'read'; return ''; } function schreibe($id, $sess_daten) { echo 'write'; return true; } function loesche($id) { echo 'destory'; return true; } function gc($maxlifetime) { echo 'gc'; return true; } session_set_save_handler("oeffne", "schliesse", "lese", "schreibe", "loesche", "gc"); session_start(); session_write_close(); //session_regenerate_id(true); session_set_save_handler("schliesse", "oeffne", "lese", "loesche", "schreibe", "gc"); session_start();
Output for 7.1.0
PHPSESSID Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 readclose Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 close Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 read Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 Fatal error: Uncaught ArgumentCountError: Too few arguments to function oeffne(), 0 passed and exactly 2 expected in /in/UA1ts:4 Stack trace: #0 [internal function]: oeffne() #1 /in/UA1ts(48): session_start() #2 {main} thrown in /in/UA1ts on line 4
Process exited with code 255.
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.0.14
PHPSESSID Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 read Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 writecloseclose Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 read Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 destory Warning: Missing argument 1 for oeffne() in /in/UA1ts on line 4 Warning: Missing argument 2 for oeffne() in /in/UA1ts on line 4 Notice: Undefined variable: session_name in /in/UA1ts on line 6
Output for hhvm-3.12.0
PHPSESSIDreadwritecloseclosereaddestory Warning: oeffne() expects exactly 2 parameters, 0 given in /in/UA1ts on line 6 Notice: Undefined variable: session_name in /in/UA1ts on line 6
Output for hhvm-3.10.0
PHPSESSIDreadwritecloseclosereaddestory Warning: oeffne() expects exactly 2 parameters, 0 given in /in/UA1ts on line -1 Notice: Undefined variable: session_name in /in/UA1ts on line -1
Output for 5.1.0 - 5.2.3, 5.2.5 - 5.3.7, 5.3.9 - 5.4.45
PHPSESSIDread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 writeclosecloseread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 destory Warning: Missing argument 1 for oeffne() in /in/UA1ts on line 4 Warning: Missing argument 2 for oeffne() in /in/UA1ts on line 4 Notice: Undefined variable: session_name in /in/UA1ts on line 6
Output for 5.2.4, 5.3.8
PHPSESSIDread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 writeclosecloseread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 gcdestory Warning: Missing argument 1 for oeffne() in /in/UA1ts on line 4 Warning: Missing argument 2 for oeffne() in /in/UA1ts on line 4 Notice: Undefined variable: session_name in /in/UA1ts on line 6
Output for 4.3.2 - 4.3.5, 4.3.7 - 5.0.5
PHPSESSIDread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 writeclosecloseread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 destory Warning: Missing argument 1 for oeffne() in /in/UA1ts on line 4 Warning: Missing argument 2 for oeffne() in /in/UA1ts on line 4
Output for 4.3.6
PHPSESSIDread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 gcwriteclosecloseread Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 destory Warning: Missing argument 1 for oeffne() in /in/UA1ts on line 4 Warning: Missing argument 2 for oeffne() in /in/UA1ts on line 4
Output for 4.3.0 - 4.3.1
PHPSESSIDread Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 42 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 42 writeclosecloseread Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent by (output started at /in/UA1ts:6) in /in/UA1ts on line 48 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/UA1ts:6) in /in/UA1ts on line 48 destory Warning: Missing argument 1 for oeffne() in /in/UA1ts on line 4 Warning: Missing argument 2 for oeffne() in /in/UA1ts on line 4