3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Sessie starten of hervatten session_start(); // Bevat de sessie een user? if (isset($_SESSION['user'])) { // Ja, user hergebruiken $user = unserialize($_SESSION['user']); } else { // Nee, nieuwe user instantiƫren $user = new User(); $_SESSION['user'] = serialize($user); } class User {}
Output for 5.2.3 - 7.1.0
Output for 4.3.2 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/AdE2E on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/AdE2E:3) in /in/AdE2E on line 3
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/AdE2E 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/AdE2E:3) in /in/AdE2E on line 3