3v4l.org

run code in 300+ PHP versions simultaneously
<?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 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
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 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 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

preferences:
163.36 ms | 402 KiB | 216 Q