3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (empty($_SESSION['lastAccess'])) $lastAccess = time(); else { $_SESSION['lastAccess'] -= time(); } var_dump($_SESSION['lastAccess']); if ($_SESSION['lastAccess'] > 5) { echo('session timeout'); }
based on 2Lb2i
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: _SESSION in /in/EciIf on line 6 NULL Notice: Undefined variable: _SESSION in /in/EciIf on line 8
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: _SESSION in /in/EciIf on line 6 NULL Notice: Undefined variable: _SESSION in /in/EciIf on line 8