3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Sessie starten of hervatten session_start(); // Sessievariabelen wissen $_SESSION = array(); // Sessiecookie laten verwijderen door de browser if (ini_get('session.use_cookies')) { $cookie_params = session_get_cookie_params(); setcookie( session_name(), '', time() - 42000, $cookie_params['path'], $cookie_params['domain'], $cookie_params['secure'], $cookie_params['httponly'] ); } // Sessie vernietigen session_destroy(); // Tijdelijke redirect naar de homepage header('Location: http://www.example.com/'); exit;
Output for 5.2.3 - 7.1.0
Output for 5.2.0 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/Bgbvb on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/Bgbvb:3) in /in/Bgbvb on line 3
Output for 4.3.2 - 5.1.6
Warning: session_start(): Cannot send session cookie - headers already sent in /in/Bgbvb on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/Bgbvb:3) in /in/Bgbvb on line 3 Notice: Undefined index: httponly in /in/Bgbvb on line 16 Warning: setcookie() expects at most 6 parameters, 7 given in /in/Bgbvb on line 17
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/Bgbvb on line 3 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/Bgbvb:3) in /in/Bgbvb on line 3 Notice: Undefined index: httponly in /in/Bgbvb on line 16 Warning: setcookie() expects at most 6 parameters, 7 given in /in/Bgbvb on line 17